Welcome to use FindGraph

FindGraph

FindGraph icon

FindGraph © 2002-2006 UNIPHIZ Lab

The problem:

Are you an engineer, scientist or graduate student looking for a graphing tool that will allow you to quickly analyze graphed data without having to immerse yourself into calculus and statistics books? Sometimes it is necessary to compare the data obtained from independent sources to modern data.

The solution:

FindGraph is a comprehensive, feature-rich graphing, digitizing and curve fitting software specially created for these purposes. Take any graph or data from any source (Web or PDF document, for example) add your comments and perform any manipulations, like building approximation lines. Then print your results or export them to Excel or other database.

The features:

The program comes with a straightforward interface, 200 built-in common graphing functions, support for Polar, Cartesian, and Parametric equations, various data input/export features and printing options.

Built-in Wizard of Digitization helps you to digitize the data.

FindGraph provides an easy way to do curve fitting. The program offers 10 generic fits, including Linear Regression, Logistic Functions, Fourier approximation, Neural Networks plus a library of over 120 industry-specific formulas. Built-in Wizard of Approximation helps applying different curve fits to discover the model that describes data the best.

You can use your own algorithm as Plug-In. Our developers do custom work for businesses and organizations who contact us with a need to expand the functionality of our applications.

The software also enables you to smooth, subtract, differentiate, integrate, and transform data and curves.

FindGraph is COM server. This means, that plot can be copied and pasted (embedded) directly into word processors, Excel or drawing programs. To edit embedded plot, double click the mouse button on it.

The program supports OLE automation and can be built-in in your software. Samples (VB, C++) are included.

FindGraph is released as shareware. You can test the software at no charge for the entire length of trial period - 30 Days. For more information, see our Purchase Page.

If you have any suggestions of what you would like to see in future versions, or questions on how to order it, please e-mail support@uniphiz.com.

Quick start ...


System Requirements

  • x86-based personal computer;
  • A mouse;
  • No less than 16 MB RAM;
  • 2.5 MB hard disk space;
  • Microsoft Windows 95/98/ME/2000/XP;
  • Internet Explorer 4 or later.


Getting started with FindGraph

Getting started

The program is very easy to learn. Use the fully functional FindGraph’s Trial and experiment with its many features. This is the only way to become familiar with its ease of use and power to manipulate data.

To begin using the program, make the following:

  1. Run the program.
  2. Click the button line or line and draw several series of points of different color and size.
  3. Click the button line and draw an area around the points.
  4. Click the button line, move the mouse and click inside the area. Dialog 'Information on selected area' will appear.
  5. Click the button <Function...>. 'Approximation line' Wizard will appear.
  6. Follow five steps and build regression line.
  7. To show points density picks, select 'Distribution' mode line.

Now you are ready to solve the real problems. For instance:

Take points from text file and build a line of regression. Move and add point's interactively to view their influence on your point of correlation.

Open Internet Explorer and digitize points from stocks chart. Build the approximation line.

To help you to learn the program quickly, we shipped several samples.


How to register FindGraph

How to register

FindGraph is shareware software. It costs $49.95(US), and upgrades are free. Please check program's web site for the latest version and prices.

Why register

  • Ability to use the program without any limitations after the 30-day evaluation period.
  • No nag screens.
  • Information about the program is not shown then you print the graphs or embed the plot as OLE object.
  • Free life support via e-mail.
  • Free upgrades. You will get all the future versions free of charge.
  • Plugins for licensed users at no charge.
  • And by registering you provide the resources to support the software with enhancements and updates.

How to purchase

To order the program, point your browser to the following URL and fill in an order form with 3 steps. You will receive registration details immediately to your mail box.

  • For European customers we recommend registration of our products over online services granted by the ShareIt.

    Order online by ShareIt

  • For USA customers more preferable purchase over online registration service offered by RegNow.

    Order online by RegNow

NOTE: Registration code will be sent via e-mail. It is essential that you provide an accurate e-mail address. Your e-mail address is confidential and will never be provided to a third party.

After registration

After registration you will get registration code. To enter registration code, click <Register...> in <Help> menu. A register dialog box will pop-up. Input your registration code. The best way not to make a mistake entering this data is to use copy and paste. Click Ok button.

Information for customers

There are several convenient ways to purchase FindGraph:

  • Purchase on the Internet: We have partnered with RegNow and ShareIt to provide secure Internet credit card purchases (Visa, MasterCard, American Express, and Discover accepted).
  • Purchase by Telephone, Fax, or Postal Mail: If you're a little concerned about using a credit card over the Internet, we can also accept credit card purchases by telephone or fax, or checks or money orders. To place your order, use the Internet purchase links above, but select the Fax, Postal Mail, or Phone options. The web site will then give you the additional information you need, such as telephone or fax numbers or mailing address.
If you have a problem with registration contact author.


Manual

Data | Points series, area, function, commentary
Import/Export | Wizard of Creation
Digitize Data | Wizard of Digitization
Transform Data | Smooth, subtract, differentiate, integrate
Procrustes Analysis | Procrustes analysis
Filter Data | FFT filters
Curve Fitting | Building approximation lines
Linear Regression | Linear Regression
Interpolation | Interpolation
Formula | Parametric graphs
Background | Image filters and placement
Editor | Points editor
Occupation | Points occupation
Distribution | Points density distribution
Diagram | Diagram
Analysis | Trace data and curves
Distances | Distances
Statistics | Correlation
Options | Options
Active Document | Embedding in Word, Excel
Automation | Automation methods, Fitting Automation Methods


Data

FindGraph saves data in its own format. WINDOWS registers format (extension 'fgr') as 'FindGraph.Document'. The document includes the arrays of objects:

  • Series of points - coordinates (X, Y, Z) and parameters;
  • Areas - coordinates (X, Y) of marks and parameters;
  • Functions;
  • Commentaries;
  • Parameters of axes and of the plot.

There are no formal limitations on quantity of objects. All objects of the program can be exported to XML file.

Series of points

Each point of a series has three parameters (double 8 bytes): X and Y in physical units of axes and Z. There are no formal limitations on quantity of points.

Parameter Z
  • The number to keep weight and error bars,
  • The current local time hour:min:sec;msec,
  • The number of milliseconds that have elapsed since the series was started.
In calculations Z is used only as weight.

The parameters of series:

  • The title of a series - by default title is set on a way of creation of a series.
  • The color. One of 6 possible.
  • Data marker, a bar, area, dot, slice, or other symbol in a chart that represents a single data point or value that originates from a datasheet cell.
  • The sizes (X, Y) - the radius of circle point and the aspect ratio. The difference of points on size is used when calculation the distribution and correlation.
  • Error bars graphically express potential error amounts relative to each data marker in a data series.
  • Data point labels.

There are different ways to collect points:

  • To add points interactively with Graphical Editor.
  • To take the points from the Clipboard;
  • To read the points from text file;
  • To input the points with text editor;
  • To digitize from the screen or background picture;
  • To use automation.

Use the Information dialog to change the parameters of series and to sort the points of series. Use the Text editor to edit X, Y, Z values. The points can be moved and erased with Editor.

The program allows different ways to export information about points to the other programs and files:

  • To copy points and put it on the Clipboard.
  • To save as ASCII table;
  • To save as XML file;
  • To use automation.

Areas

The area is determined by physical coordinates (X, Y) of marks. The parameters of area:

  • The title - by default title is set on a way of creation, 'Rectangle' or 'Clip'.
  • The color. One of 6 possible.

There are two ways to create an area:

  • To draw it with Editor.
  • To use automation.

When paint, you can fill areas with color and hide the marks. Use the Information dialog to change the parameters.

The areas will be used:

  • To select the points;
  • To move and erase the points with Editor;
  • To digitize;
  • To build the line of approximation;
  • To calculate the correlation factor;
  • To zoom.

Functions

The approximation is build on points you selected or on series of points. The parameters of function:

  • The title - by default title is set on approximation method;
  • The color and width of line;
  • Additional lines.

Use the Information dialog to change the parameters .

Commentaries

The parameters of commentary:

  • The text;
  • The font, size, orientation and color;
  • The indent type;
  • The background color;
  • The shadow.

Use the Information dialog to change the parameters. The coordinates of commentary are in physical units and are recalculated when scaled.

The commentary can be paint as distributed under the document text. See the sample how to add a commentary.


The Wizard of Creation

The Wizard of Creation new series of points

On a step 1 it is possible to select the data.

  • For parameters X, Y, Z select columns.
  • Assign with what line to begin to read the data.
  • To do it, scroll the table. Up to 100 lines can be displayed.

On a step 2 data are read. Assign the X, Y clip region and scale factors.

  • Select X, Y intervals 'min' and 'max' in physical units of measurements. Only points inside clipped intervals will be added to points series.
  • Assign multiplier. Each data point will be multiplied by the scale factor. Use it to normalize values with different physical units of measurements.
  • Use button <Limits> to set the data read X and Y intervals to clipping region.
  • Use button <Axis> to set the current plot intervals to clipping region.
  • Select to add all points read to new series. Or only points inside clipped intervals will be added.

On a step 3 set new ranges of X, Y in plot.

  • Set the axis name and physical units of measurement of parameter.
  • Select new ranges. Then you click <Next> button, the scales will be recalculated.
  • Use button <Current> to set the previous plot interval.
  • Use button <Clipped> to set the clipping region to new plot interval.

On a step 4 data are prepared, a new series of points will be built.

  • Set a title of a series.
  • Assign a color, marker, radius (X) and aspect ratio (Y/X) for new points series.
  • Use button <Add Series> to create new series of points.

Trick: Repeat steps (1-2-3-4), on step 1 select new columns, and use button <Add Series> to add next series of points from one table.

See example.


Built-in Wizard of Digitization

You select one or several areas and start the Wizard of Digitization. On steps 1 and 2 you select mapping region, and set the scale by setting X left, X right, Y top and Y bottom values. On steps 3 and 4 graphs are handled automatically. On step 5 you can manually add single data points and remove mistakes.

Important: Only points inside selected areas will be digitized.

On a step 1 you need to select mapping region.

  • Use arrows to accurately define mapping region to digitize.
  • It is possible to rotate mapping region.

On a step 2 set new ranges of X and Y in mapping region you selected.

  • Set the axis name and physical units of measurement of parameter.
  • Select new ranges. Then you click <Next> button, the scales will be recalculated.
  • Linear or logarithmic axis are supported.
  • Use button <Current> to set the previous plot interval.

On a step 3 select parameters to digitize data automatically.

  • Select direction to follow curve to digitize automatically.
  • Select to exclude or not border, net lines, and poor (single) points from digitization.
  • Input digitization step.
  • Select fixed step to digitize with const step.
  • If one point on step is selected, only one curve of several parallel curves will be digitized.

On a step 4 select pixel colors to digitize data automatically.

First of all you need to add colors in list. To do it, move mouse cursor on the picture, select data point you want to digitize, and push key <C>. Then select colors 'checked' and click <Digitize> button.

  • Then you click <Next> button, the graphs will be processed.
  • Use button <Digitize> to preview.
  • Use 'cursor position zoom' to add colors accurately.

On a step 5 you can remove mistakes, and add single data points manually.

Move mouse cursor on the digitized point. To remove point push key <Delete>. To add point push key <Insert>.

  • Use 'cursor position zoom'.
  • Then you click <Remove All Points> button, all points added on step 4 (automatically) and 5 will be removed.
  • Then you click <Remove Points Added> button, only points added on step 5 (manually) will be removed.

On a step 6 data are prepared, a new series of points will be built.

  • Set a title of a series.
  • Assign a color, marker, radius (X) and aspect ratio (Y/X) for new points series.
  • Use button <Add Series> to create new series of points.
  • Use button <Picture> to Show/Hide background picture.

Trick: Repeat steps (4-5-6), on step 4 select next color, and use button <Add Series> to digitize the graph with new color, and to add next series of points.

See example.


Transformations

Tools

Click the button Transformation or select menu item <Analysis><Transformation> to create new series. Select tool:

  • Copy to exchange (X, Y), to exchange (Y, Z), transpose (X, Y) to (row number, X) or to (row number, Y), flip X or flip Y values, simulate data (Y values) with random error, to apply function.
  • Linear to translate, scale, rotate data.
  • Subtract to subtract or divide data on const, or to subtract baseline, or to subtract function you input. There is a feature to find and extract baseline.
  • Formula to transform points.
  • Normalize to normalize data between Y limits you define.
  • Prune to skip or to combine rows (take the arithmetic mean or the harmonic mean or the geometric mean) and or exclude data out of limits X.
  • Spikes to exclude random spikes or to exclude close points.
  • Neighbours to exclude replicating points, or to exclude points near existing plot, or to exclude points near function.
  • Smooth to apply adjacent averaging.
  • Interpolate to generate a new curve with a constant spacing on the X axis.
  • Differentiate to calculate derivatives.
  • Integrate to calculate integrals.
  • Convex Hull to construct a discrete Convex Hull as a new series.
  • >Procrustes analysis to find a new series.
  • Filter to eliminate noise with FFT filters.

In all dialogs you can modify properties of new series (formulas, parameters, color, radius and so on).

Formula

It is possible to transform selected points ( u, v ) and create new series of points ( x, y ) in the form
y( u, v ) = f2(u, v), x( u, v ) = f1(u, v). You can use parameters a, b, c, d in formula: Const; Medium values of x and y; Any Function or the Formula you created.

Notes:

  • Only variables u, v and parameters a, b, c, d are possible in formula expression.
  • Default value of parameters is 0.

The set of operations and functions.

See the formula.

See example how to transform points.


Interpolation

Procrustes analysis

The program performs a least-squares orthogonal generalized Procrustes analysis (least-squares orthogonal mapping). Procrustes analysis is a method of comparing two sets of data. The method is based on matching corresponding points (landmarks) from each of the two data sets.

Landmarks are points that accurately describe a shape. Corresponding landmarks would be the same landmark on two different shapes.

Procrustes analysis is a rigid shape analysis that uses isomorphic scaling, translation, and rotation to find the “best” fit between two or more landmarked shapes.
See wikipedia for generalized orthogonal Procrustes analysis, and 'Procrustes Analysis' by Amy Ross, www.cse.sc.edu.

FindGraph uses scaling, translation, rotation, and additionally stretching/compressing and shearing transformations. It applies nonlinear mapping algorithm to find best fit, i.e. to find a reference cluster of landmarks, so that the distance of each reference landmark to it's corresponding 'experimental' landmark is minimised. Data points can be given greater or less influence over the Procrustes analysis by assigning a weight to each point.

To you define a reference cluster of landmarks you have to select the data series and to define N marks.

There are different ways to define an 'experimental' cluster of landmarks:

  • select the points by hand;
  • take first N points in series;
  • find best pattern of N points in series.


FFT and wavelet filters

Filter

Select menu item <Analysis><Filter> to apply the Fast Fourier Transform (FFT) filters or the Daubechies D4 Wavelet Tranform for digitally filtering data.

FindGraph provides five filters for digitally filtering data:

  • The low pass filter allows you to eliminate noise at high frequencies.
  • The high pass filter to eliminate noise at low frequencies.
  • The band pass filter allows you to eliminate noise above and below a specified frequency range.
  • The band block filter allows you to eliminate noise within a specified frequency range.
  • The threshold filter allows you to eliminate noise corresponding to frequency components that are below a specified threshold.

In dialog you can modify low and high frequencies and amplitude threshold level.

An inverse FFT and Wavelet Transform is performed on the filtered frequency spectrum to yield a new data series containing the original data with the noise removed.


The convolution and the correlation

Select menu item <Analysis><Convolution> to apply the convolution for digitally filtering data.

Convolution

In linear systems convolution is used to describe the relationship between three signals of interest:

  • the input signal Y[i],
  • the impulse response F[i] (filter kernel),
  • the output signal W[i]
    • .
Convolution is defined by the convolution sum:

FindGraph includes several filter kernels F(u):

  • Common filter kernels (Delta function, Amplification, Attenuation, Inverting, Shift, Echo, First derivative, Integral).
  • Low-pass filter kernels to provide an averaging (smoothing) of the signal (exponential, rectangular, Gauss function, sinc function with Hamming or with Blackman windows).
  • High-pass filter kernels.
You can draw your own signal or to modify a selected signal. Simple click on left chart and use the mouse to draw your own signal.

You can use series of points or any function (formula), you created, as filter F[u]

Correlation

Correlation is a mathematical operation that is very similar to convolution. Convolution is the relationship between:

  • the input signal Y[i],
  • the impulse response F[i],
  • the output signal W[i]
    • .
This output signal is called the cross-correlation of the two input signals:

Read more: The Scientist and Engineer's Guide to Digital Signal Processing by Steven W. Smith, Ph.D.


Interpolation

Interpolation guarantees that the fitted curve will pass through each and every data point.

Lagrangian interpolation

Interpolating the data set with a polynomial. The order of the polynomial is determined by the number of points in the data set. The Lagrangian interpolating polynomial exhibits more oscillatory behavior as the degree increases. FindGraph limits the use of Lagrangian interpolation to data sets with 18 points or less.

Linear

Interpolating the range between data points (Xi,Yi) and (Xi+1,Yi+1) by a straight line. The interpolation function tooks two inputs. The simplest form of interpolation.

Cubic

Interpolating the range between data points by 3rd order polynomials. The interpolation functions took four inputs, including the point (Xi-1,Yi-1) before (Xi,Yi) and the point (Xi+2,Yi+2) after (Xi+1,Yi+1)

Cubic Spline

Interpolating the range between data points by 3rd order polynomials. Cubic spline curve fitting ensures that each spline is equal to the data points, the 1st derivatives are continuous at the knots, and the 2nd derivatives are continuous at the knots.

As against interpolation Regression curve fits and Linear Regression discover the best model to describe your data.

There are different ways to connect consequent points:

Y = f(X) | X increases.
X = f(Y) | Y increases.
f(X, Y) | Sequence number, i.e. parameter Z increases.
R = f(fi) | In Polar coordinates angle fi increases. First we sort normalized data.


Linear Regression

The form of the general least squares linear regression model is:

where fj(X) are any arbitrary functions of X that are called the basis functions. In regression modeling, the term 'linear' means that the models dependence on its parameters Aj is linear. The functions fj(X) may be nonlinear.

The parameters Aj are estimated by the method of least squares.
Standard error of the estimate:
where Xi, Yi are the data points,
n - Number of data points.

Basis functions

In FindGraph, linear regression model is linear combination of basis functions fjk(X).

Polynomial | f1k(X) = ((X-X1)/W1)^k
Rational | f2k(X) = (W2/(X-X2))^k
 | f3k(X) = sqrt((X-X3)/W3)
Logarithmic | f4k(X) = (log ((X-X4)/W4))^k
Exponential | f5k(X) = exp((X-X5)/W5*k)
Fourier | f6k(X) = sin((X-X6)/W6*k)
 | f7k(X) = cos((X-X6)/W6*k)

Parameters Xj and Wj are fixed. The parameter k varies from 1 up to 8.

Fitting Log Window

FindGraph copies information about data fitting to the Log Fitting Window. To view it select menu item <View><Fitting Log>.

See examples.
See Fitting, Interpolation.


Curve fitting

Fitting

The purpose of constructing a line of approximation (fitting) - to discover the best model to describe your data and to show where the appearance of new points is most possible.

You have a table of points (X, Y). If you have model representation for these numeric Y( X ) data (Y=f( X,aj ) with parameters aj, j=1..m), you can find numeric values of aj that made table-defined curve Yi( Xi ) and model curve Y=f( X,aj ) most similar. This process is known as fitting. If you have not model representation you have to find this curve fit.

In this version of the program a series of points is esteemed as time-invariant flow of points (X, Y). Time (sequence number, parameter Z), X, Y sizes of a point are unused. Methods of approximation (fitting) are used in program:

  • Regression line f( X ) or f( Y );
  • Piece linear f( X ) or f( Y );
  • Logistic functions f( X ) or f( Y );
  • Fourier approximation;
  • Neural network;
  • Non-linear least-square fitting;
  • Formula;
  • Parametric curve;
  • B-spline curve;
  • Sections ( X, Y );
  • User defined function.

Built-in Wizard of Approximation will help you to apply a variety of curve fits to your plot.

You can add Plug-In module (DLL) to include your non-linear equations into FindGraph. Example C source code for a 'user model' Plug-In is provided in FindGraph install package. You can find it in the subfolder "UserModels". Alternatively, if you're unaccustomed to writing DLL's we'd be happy to produce a plugin for licensed users at no charge, provided that you can furnish the curve fitting model details.

Moreover you can use your own algorithm as Plug-In. Simple compile DLL with any name and place it in the subfolder "APPR". We shipped EXPPOW.DLL sample (pure C). You can find it in the subfolder "ApprSource". See file "ExpPow.cpp" for details.
Contact us for more information.

Weighting scheme

Data points can be given greater or less influence over the fitting process by assigning a weight to each point. You can specify weights Wi for a set of data points (Xi,Yi, i=1..N) for curve fitting. Four different weighting methods are supported by FindGraph:

  • No weight: Wi = 1.
  • Instrumental weights: Wi = 1/Ci^2, where Ci are the error bar sizes stored in error bar column Z.
  • Statistical: Wi = 1/Yi, or Wi = Yi, or Wi = 1/Xi, or Wi = Xi.
  • Direct: Wi = Ci, where Ci are stored in column Z.

Regression line

The analytical function from list below is built on method of correlation in interval X, Y you selected.

Polynomial | f( U ) = a0 + a1*U + a2*U^2 + ...
Hyperbolic | f( U ) = a0 + a1/U + a2/U^2 + ...
Logarithmic | f( U ) = a0 + a1*ln( U ) + a1*ln( U )^2 + ...
Power | ln( f )= a0 + a1*ln( U ) + a1*ln( U )^2 + ...
Exponential | ln( f )= a0 + a1*U + a2*U^2 + ...

The degree of approximating varies from 0 up to 15. The best function of approximating is determined on minimum error (normal deviation) and is selected from a list of analytical functions for a given degree of approximating.

Regression lines are used to graphically display trends in data and to analyze problems of prediction. Such analysis is also called regression analysis. You can extend a regression line in a chart beyond the actual data to predict future values. For logarithmic, power, and exponential regression lines, Findgraph uses a transformed regression model.

Piece linear

The straight lines are constructed with a constant step X (or Y) you selected. Each line is build through mean values of points in interval. The number of steps varies from one up to the number of points.

Logistic function

The analytical S-shaped (sigmoid) function having values in the range you selected. Findgraph uses a transformed regression model.

f( U ) = Vmin + (Vmax-Vmin) / (1 + exp(a0 + a1*U))
log(f( U ) - Vmin) = a0 + a1*exp(-U)

See also chapter Non-linear fitting Sigmoidal (Logistic) models.

Fourier

It is built on method of correlation in interval X, Y you selected.

f( U ) = a0 +a1*cos( U/T ) +b1*sin( U/T ) +a2*cos(2*U/T) +b2*sin(2*U/T) + ...
T = (Umax - Umin) / 2 / 3.14159

The degree of approximating varies from 0 up to 18.

Neural network

Neural networks are based as they are on a crude low-level model of biological neural systems. We use it only for simple non-linear approximation. All points in interval X, Y you selected, are used for neural network training. Neural network with one hidden layer was used. You can vary the number of neurons from 2 to 20 and select neuron activation function:

f( U ) = (U - dU) / (abs(U - dU) + a)
f( U ) = 1. / (1. + exp(-a*abs(U - dU)))

Parameter 'a' must be in limits 0-5.

As our problem to construct a line of approximating quickly, the number of iterations of training process is limited.

Non-linear fitting

FindGraph supplies a library of over 120 industry-specific formulas. The simplex and gradient algorithms were used for quick nonlinear regression performance. The Wizard of Approximation will help you to apply a variety of curve fits to your plot. You can utilize one of predefined fits and vary the number of parameters from 1 up to 8.

Formula

You can enter your own equation to fit your data and vary the number of parameters from 1 up to 4. FindGraph uses one of the non-linear least-square fitting algorithms, namely Broyden - Fletcher - Goldfarb - Schanno algorithm.

Parametric

FindGraph uses parametric graphs X(u), Y(u) to fit data with curves.
X(U) = X0 + A1*sin(2piU)+...+An*cos(2pin*U)
Y(U) = Y0 + B1*sin(2piU)+...+Dn*cos(2pin*U).
Parameter 'U' varies from 0 to 1.
Find the curve that approximates the data polygon in the sense of least square.

The number of harmonics M varies from 1 up to 60.
A least squares curve approximation for closed curves is possible.

B-splines

Given a set of N+1 data points, a degree p, and a number M, where N > M >= p >= 1, find a B-spline curve of degree p defined by M+1 control points that passes through the first and the last points and this curve satisfies a least square criteria.

The number of control points M varies from 1 up to 60.
The degree p varies from 1 up to 6.
If a number of data points N < 60 an interpolation is possible. In interpolation, the curve passes through all given data points in the given order.
An interpolation and a least squares curve approximation for closed curves are possible.

Sections

The sections of straight lines are built on one of algorithm of the theory of pattern recognition. In the given version the method "dot transformation" (Hough Transformation) was used. The method is based on geometrical matching of input groups of points with standards. The sections of straight lines are selected as the standards. Used parameter - number of clusters of a grid N - is varied from 2 up to 100.

User defined functions

Several Plug-In's are included in FindGraph distributive:
  • f(U) = V0 + Exp(a*(U-U0))*Pow((U-U0),b); Source code is included.
  • V(U) = V0 + (U-U0)^M * (A0 + A1*U + ... +AN*U^N)
    Parameters:
    M = pow of (U-U0) in limits from -5 to +5
    N = pow of polynomial approximation in limits from 0 to +5
  • Lines on Step: V(U, i) =Vi0 + Ai*(1 - exp(-(U-Ui0)/Bi) with Ai,Bi for each step.
    Parameters:
    Step value, default 2. Number of steps is (Umax - Umin) / Step.
    Enhanced, if 1 - nonlinear fitting model
    if 0 - simple logistic model, i.e. Yi0 and Ai are fixed
    Fixed x0, if 1 - x0i is fixed x0i = min(x) in interval
  • f(U) = A0 + A1*U + ... +An*U^N;
    Find the line that minimizes the perpendicular distance between line and points.
    This is so called 'Deming regression'. It fits a polynomial line assuming equal experimental errors in both U and V.
    In contrast, ordinary regression assumes that the U values are known precisely and all the experimental error is in V. The calculations require that U and V are in the same units.
    Parameters:
    If 1, fixed point (U0, V0) on resulting line.
    N = pow of polynomial approximation in limits from 0 to +4

You can use your own algorithm as Plug-In. To use, prepare DLL, and copy this DLL to subdirectory 'Appr'. You find example of DLL with source code (pure C) in subdirectory 'ApprSource'.

Our developers do custom work for businesses and organizations who contact us with a need to expand the functionality of our applications.

Best fit function

Built-in Wizard will help you to find the best curve fit. The best function is determined on minimum standard error of the estimate. It is selected from a list of polynomial and Fourier functions and from a library of industry-specific nonlinear functions.

To start Wizard select menu item <Fit><Best Function>.

Fitting Log Window

FindGraph saves all information about data fitting and transformations in Log Fitting Window. To view it select menu item <View><Fitting Log>. You can add your notes and save all information as HTML file.

See examples.

See Linear Regression, Interpolation.


Transformations

Curves library

At the FindGraph library there are more than 200 built-in famous 2-D curves from the areas of elementary mathematics, transcendental functions, probability and statistics, optimization, and graphics.

You can investigate these curves and vary the number of parameters to discover the best model that describe your data.

Click the button Famous curves or select menu item <Analysis><Famous Function> to create new function. This will cause the Formula dialog box show, where you can modify properties of graph (function, range of parameters, color, width and so on).

You can draw families of lines with a given step of parameter.


Parametric graphs, formula

Parametric graphs

Create this kind of graph to plot any explicit function in the form:
  • Parametric Y( u ) = f2(u, v), X( u ) = f1(u, v).
  • Polar R( u ) = f2(u, v), fi( u ) = f1(u, v), X=R*cos( fi ), Y=R*sin( fi ).
  • Cartesian Y( u ) = f2(u, v), X( u ) = u.

Click the button Formula or select menu item <Data><Formula> to create this kind of graphs. This will cause the Formula dialog box show, where you can modify properties of graph (formula, range of parameters u and v, color, width and so on). It is possible to draw families of lines with a given step of parameter v.

Notes:

  • Only variable u and parameter v are possible in formula expression.
  • Default value of parameter v is v=0.

The set of operations and functions.

When prompted to enter a formula the set of operations and functions you may use is the following.

Arithmetic operators:

+ | a + b
- | a - b
* | a * b
/ | a / b
^ | a ^ b (a to the power of b)

Built-in functions:

sin(u) | Sine, the angle 'u' must be in units of radians.
sind(u) | Sine, the angle 'u' must be in units of degrees.
sinn(u,n) | Sine of 2pi*n*u
cos(u) | Cosine
cosd(u) | Cosine, the angle 'u' must be in units of degrees.
cosn(u,n) | Cosine of 2pi*n*u
hav(u) | Haversine of u, hav(u) = (1-cos(u))/2
havd(u) | Haversine, the angle 'u' must be in units of degrees.
tan(u) | Tangent
tand(u) | Tangent, the angle 'u' must be in units of degrees.
sinc(u) | Sine(u)/u
asin(u) | Inverse sine
acos(u) | Inverse cosine
atan(u) | Inverse tangent
rad(u) | Converts an angle measured in degrees to the equivalent number of radians.
exp(u) | Exponent (i.e e to the power of u)
ln(u) | Natural logarithm (base e)
log(u) | Logarithm base 10
pow(u, v) | u to the power of v
sqrt(u) | Square root
factorial(u) | u!, if u value is not an integer, it is truncated.
sinh(u) | Hyperbolic sine
cosh(u) | Hyperbolic cosine
tanh(u) | Hyperbolic tangent
asinh(u) | Hyperbolic arc sine
acosh(u) | Hyperbolic arc cosine
atanh(u) | Hyperbolic arc tangent
besselj0(u) | Bessel functions of the first kind: orders 0, 1, and n, respectively
besselj1(u) |
besseljn(u, n) |
bessely0(u) | Bessel functions of the second kind: orders 0, 1, and n, respectively
bessely1(u) |
besselyn(u, n) |
 | The polynomials: orders 0, 1, and n, respectively
chebyshev(u,n) | The Chebyshev polynomials of the first kind: 1, u, 2u^2-1, 4u^3-3u,...
legendre(u,n) | The Legendre polynomials: 1, u, (3u^2-1)/2, (5u^3-3u)/2,...
laguerre(u,n) | The Laguerre polynomials: 1, 1-u, (4u^2-4u+2)/2, (-u^3+9u^2-18u+6)/6,...
hermite(u,n) | The Hermite polynomials: 1, 2u, 4u^2-2, 8u^3-12u,...
neumann(u,n) | The Neumann polynomials: 1, 1/u, 1/u^2, (u^2+4)/u^3,...
gamma(u) | Integral( x^(u-1)*exp(-x) ), with x limits from 0 to infinite
lngamma(u) | The natural logarithm of gamma function
beta(u, v) | Integral( x^(u-1)*(1-x)^(v-1) ) with x limits from 0 to 1
normal(u, v) | exp( -u*u/4/v/v )/v/sqrt(2*pi)
normln(u, v) | exp( -ln(u)*ln(u)/4/v/v )/v/sqrt(2*pi)
normalsum(u) | Returns the area under the Gaussian probability density function, integrated from minus infinity to u.
expdist(u, v) | v*exp(-v*u)
expdistc(u, v) | 1 - exp(-v*u) The formula is the integral from 0 to u value of expdist(u, v).
poison(u, v) | exp(-v)*v^u/u!, if u value is not an integer, it is truncated.
poissonfirst(u, v) | Returns the sum of the first v terms of the Poisson distribution.
poissonlast(u, v) | Returns the sum of the terms v+1 to infinity of the Poisson distribution.
erf(u) | The error function ERF(u).
erfc(u) | The complementary error function returns the complementary ERF function integrated between u and infinity.
chisqleft(u, v) | Returns the area under the left hand tail (from 0 to u) of the Chi square probability density function with v degrees of freedom.
chisqright(u, v) | Returns the area under the right hand tail (from u to infinity) of the Chi square probability density function with v degrees of freedom.
fisher(u) | 0.5*ln((1+u)/(1-u)), the Fisher transformation at u
fisheri(u) | (exp(2u) - 1)/(exp(2u) + 1), the inverse Fisher transformation
abs(u) | Absolute value
int(u) | Integer part of u
max(u,v) | Maximum of u and v
min(u,v) | Minimum of u and v
ceil(u) | Returns the smallest integer that is greater than or equal to u.
floor(u) | Returns the largest integer that is less than or equal to u.
round(u) | Returns the value of the argument u rounded to the nearest int value.
fmod(u,v) | Calculates the floating-point remainder f of u / v such that u = i * v + f, where i is an integer.
hypot(u,v) | Calculates the expression sqrt(u*u + v*v).
sign(u) | Sign of u. If u is less than 0, the value of the function is -1. If u is equal to 0, the value of the function is 0. If u is greater than 0, the value of the function is 1.
step(u,v) | Step function. If u is less than v, the value of the function is 0. If u is greater than or equal to v, the value of the function is 1. If you need a function which is 1 up to a certain value and then 0 beyond that value, use the expression step(v,u).
equal(u,v) | If u is equal to v, the value of the function is 1, else 0
equalzero(u) | If u is equal to 0, the value of the function is 1, else 0
ltzero(u) | If u is less than 0, the value of the function is 1, else 0
gtzero(u) | If u is greater than 0, the value of the function is 1, else 0
random(u) | Random number generator, generates a random floating point number such that 0 ≤ Result < u
effect(u, v) | (1 + u/v)^v - 1, financial function. u is the nominal interest rate, v is the number of compounding periods per year.

Predefined constants:

pi | 3.141592654
e | 2.718281828

See example.


The Background Picture

Background picture

It is used for visualization or for digitization of points.

Image

Visible | Select to display or not the background picture.
<Open> | Drag and Drop file (bmp, gif, jpg, wmf, emf) or click button.
<Paste> | An image stored on the Windows Clipboard as bitmap will be pasted into your outline.
<Save As> | Saves your background picture file to disk. All filters you selected will be applied.
<Copy> | The background picture will be placed on the Windows Clipboard as bitmap image, and may be pasted in elsewhere.
<Default> | Restores parameters (filters, placement) used by default.

Filters

Black and White | The image is converted to black and white.
Negative | The image is converted to a reversed color version of the original.
To Grayscale | The image is converted to grayscale.
Sharpen | Apply the sharpen filter.
Edge Detection | Finds the main lines in an image and replaces their color with the opposite color, at the same time most fill colors are darkened, making them like a background.
Median Filter | Causes a group of pixels to have the brightness of the average pixel in that group.
Threshold | Move the setting up, to exclude pixels with high brightness.
Neighbors | Move the setting up, to exclude single pixels.

Placement

Resize to plot | Select to resize or not the background picture on whole size of plot.
On page center | Select to draw the background picture on page center or on left upper corner.
Vertical Flip | The image will turn upside-down.
Horizontal Flip | The image will turn side-to-side, as in a mirror.
Rotate 90 | The image will turn 90 degrees.
Rotate | This allows you to enter an angle (in tenths of degrees, range: -900 - +900) for the image rotation,

Trick: Use <Add Points from Screen><Capture Area> tool to get the background picture.


Editor

Editor toolbar The Editor will be used:
  • Rectangle Area Irregular Area Brushed Area Remove Area Marks Remove Area To edit areas;
  • Points on Lines Drop Points Erase Points To edit points;
  • Select area To select area;
  • Commentary To add commentary;
  • Information To view information;
  • Magnifying Glass To zoom;;
  • To select the current Color;
  • To select the marker of points in new series;
  • To select the radius of points [0.1 mm] in new series;

X, Y are values in point of the cursor in physical units of axes.

Edit areas

Rectangle Area Lets you assign editor mode <Rectangle Area>. In this mode it is possible:

  • To create new rectangle area 'Rectangle' with current color.
  • To move existing area. To do it, hold 'Shift' key and move the mouse.
  • To change the size of area. To do it, click on the marks and move them.

Irregular Area Lets you assign editor mode <Irregular Area>. In this mode it is possible:

  • To create new area 'Clip' with current color.
  • To move existing area. To do it, hold 'Shift' key and move the mouse.
  • To change the size and the shape of area. To do it, click on the marks and move them.

Brushed Area Lets you assign editor mode <Brushed Area>. In this mode it is possible:

  • To create new area 'Clip' with current color.
  • To move existing area. To do it, hold 'Shift' key and move the mouse.
  • To change the size and the shape of area. To do it, click on the marks and move them.

Remove Area Marks Lets you assign editor mode <Remove Area Marks>. In this mode it is possible:

  • To remove areas marks of color area;
  • To remove areas marks of any area. To do it, hold 'Shift' key and move the mouse.

Area will be deleted, if remain less four marks. Also you can delete the function of approximation.

Remove Area Lets you assign editor mode <Remove Area>. In this mode it is possible:

  • To remove color area or function under cursor quickly;
  • To remove any area. To do it, hold 'Shift' key and click the mouse.

Edit points

Points on Lines Lets you assign editor mode <Points on Lines>. In this mode it is possible to create new points series 'Line' with current color, marker, radius and aspect ratio. The points are placed along direct line. The distance between points is assigned on property page <Options><Editor>.

Drop Points Lets you assign editor mode <Drop Points>. In this mode it is possible: to create new points series 'Spray' with current color, marker, radius and aspect ratio. To drop points, move the mouse and click left button. Minimum distance between following points is assigned on property page <Options><Editor>.

Erase Points Lets you assign editor mode <Erase Points>. In this mode it is possible:

  • To remove points with current color;
  • To remove points any color. To do it, hold 'Shift' key and move the mouse.

The series will be deleted, unless remain points.

Select

Select area Lets you assign editor mode <Select Area>. In this mode it is possible:

  • To select simultaneously several areas;
  • To remove all selected areas with points on key <Delete>;
  • To move all selected areas with points of current color;
  • To move all selected areas with points of any color. To do it, hold 'Shift' key and move the mouse.

Information

Information Lets you assign editor mode <Information>.

Click on clean field of plot:
  • To get information on summary number of points.

Click on point:

  • To edit or delete the series of points;
  • To build the approximation on points of series.

Click on area:

  • To edit the parameters of area;
  • To get information on points inside the area;
  • To build the approximation on points inside the area.

Click on function:

  • To edit or delete the function;
  • To assign the interval of function.


Occupation

Editor view | Editor view The plot in <Points Editor> view mode. Each point of the chart is drawn with its marker, size and aspect ratio Y/X. The points may be connected by lines.
Occupation view | Occupation view The same plot in <Points Occupation> view mode. Each point of the chart is drawn with rectangle, but with its color, size and aspect ratio Y/X. The purpose is to display the overlapped points.

The Editor are similar in <Points Editor> view mode as in <Points Occupation> view mode.


Distribution

Distribution view Distribution view The plot in <Distribution> view mode.

Density function is constructed on all points. The contribution of each point is determined by its own density distribution function. The contributions from different points are summarized proportionally to number of points or proportionally to area of points. The density distribution function of single points is assigned on property page <Options><Density>.

The color intensity of a cell is proportional to densities function. Distribution is normalized on 100% at maximum. By default distribution of density is constructed for points of each color.

Use this view mode to find and show density distribution picks. By default brightness and color are proportional to density. Use logarithmic scale, to increase contrast. It is useful for maximums searching. To change view settings, go to property page <Options><Distribution> and select quality and transparency.

Trick: Use button <Apply> as Preview.

Menu items available in all view modes:

  • Show/Hide regions with density in assigned ranges;
  • Draw the distribution with provision for color of points or summary.
  • Draw color distribution or vectors of gradients.


FindGraph's Diagram

Diagram

Diagram view Diagram view The plot in <Diagram> view mode.

In this mode points are grouped in cells. You see the summary number of points in cell. The means and trends (X, Y) are built on points of each cell. Groups of points of the chart are displayed as circles (ellipses) or squares. The area of a circle
is proportional to number of points in a cell. The center of a circle is situated in mean point of group.

To change view settings, go to property page <Options><Diagram> and select size of cell, centers of groups.

Trick: Use button <Apply> as Preview.

Menu items available in all view modes:

  • Draw diagram cells as circles or as squares;
  • Draw or not numbers of points in cells;
  • Draw or not groups trends lines.


Analysis

You can further analyze X, Y data, functions and fit results. Evaluation option includes function, derivatives, table generation, and extremes. You can numerically integrate the active data plot from a baseline of zero using the trapezoidal rule.

To trace data select plot and click the button trace data or select menu item <Analysis><Trace Data>.
To trace function select function and click the button trace function or select menu item <Analysis><Trace Function>.

This will cause the Trace dialog box show. On page Trace simple scroll the data or function and follow the cursor to trace values, distances between points, and derivatives. You can change cursor on page Visualize. On page Analysis it is possible to find zeroes and extremes of the function and to pick peaks of datasets.


Distance between point and curve

 Let we have a series of points (Xi,Yi) and want to calculate the distance (metric) between points and object.

Distances

  • Distances between each point (Xi,Yi) and fixed Point (X,Y).
  • Distances between each point (Xi,Yi) and straight line (Y = a + b*X).
  • Distances between each point (Xi,Yi) and next series of points (Xni,Yni).
  • Distances between each point (Xi,Yi) and any function (defined by formula) f(Xi).
    Distance is calculated as minimum distance between point (Xi,Yi) and function f(Xi) using normal (Perpendicular from a point on a curve).
  • Distances between each point (Xi,Yi) and any function (defined by formula) f(Xi).
    Distance is calculated as projection value abs(Yi -f(Xi).

The button <Copy> lets you put on the Clipboard:

  • X,Y - point (Xi,Yi)
  • L - distance between point (Xi,Yi) and function (curve)
  • Xn,Yn - normal (or projection) on function.


FindGraph Statistics

Statistics

In this version of the program a series of points is estimated as time-invariant flow of points (X, Y). Time (sequence number, parameter Z), X, Y sizes of a point are unused.

Confidence Ellipse
  • Information on correlations the points;
  • Information on interfacing the points;
  • Regression line
  • Confidence Ellipse

The equation for the correlation coefficient is:

Where r(X,Y), the correlation coefficient (Pearson correlation coefficient), ranging from -1 to 1, calculated on all points you selected. Use the correlation coefficient to determine the relationship between two properties.

Confidence Ellipse illustrates a probability distribution on different directions. Its "Volume" is proportional to the square root of a generalized dispersion.

Interfacing factor:

f2(X,Y,N) = sum( i, j )(Nij*Nij/Ni/Nj) - 1

  • Nij - points in cell ( Xi, Yj );
  • Ni - points in row ( Xi );
  • Nj - points in line ( Yj ).

The interfacing factor f2 of two random variables is based on a contingency table. f2 measures relation between X and Y. f2 reaches max when each line or each member contains only one member which is distinct from 0.

See example.


Options

Pages:

Page, Axis X, Axis Y, Format
Editor, Density, Distribution, Diagram

Use the button <Apply> as Preview.

Page

Header | The header is displayed in upper field. Font and color of header are assigned on page <Format>. The header may be saved to XML file.
Footer | The footer is displayed in bottom field. Font and color of footer are assigned on page <Format>. The footer may be saved to XML file.
Units | Units of drawing are used when installing the sizes of drawing and axes scales. Units are displayed at axes and on status bar. By default - centimeters.
Plot size | Width on X, height on Y in selected units. The Size defines the visible area of plot including axis and is used in editing, scaling and building of distribution.
Indents | The upper field - header. The lower field - footer.

Axes

Position | Assign the position of axes on plot.
Title | Select axis title position: in center or on edges.
Direction | The direction of counting out the axes.
Arrow | Draw or not arrow of axis.
Tick | Step on axis and lines of grid. Font and lines parameters are assigned on property page <Format>. The grid is displayed over background picture.
Parameter | The axis name and physical units of measurement of parameter. Name and units of measurement may be written to TXT and XML file.
In one (cm) | Scales of axes. These are used in editing and building of distribution.
Log. scale | In logarithmic scale for each cm. (inch) axis interval limits multiply on given value (greater 1).

Trick: In the editor the click by the mouse in area of X, Y axes, it opens / hides the Scales window.

Format

Font and sizes | Assign the character's sizes in tenth shares mm. for different elements of plot. The typeface general for the whole document.
Text | Text
Header | Header only
Notes | Axes X, Y names labels
Tick labels | Axes X, Y tick labels
Footer | Footer
Line width | Assign the color and width of lines in tenth shares mm. for different elements of plot.
Main | Unused now
Axes | Unused now
Border | Axes X, Y lines
Tick | Axes X, Y tick lines

Editor

Interval between points | In modes <line> or <spray> points are put to previous not closer, than interval is given.
Draw marks | Select to draw or not marks. In editor you can move areas marks and change areas shape.
Mark size | Size (0.1 mm) of areas marks.
Brush size | Size (0.1 mm) of area in editor mode <Brushed Area>.
Background picture | Select to display or not the background picture (bmp, gif, jpg, wmf, emf). It is used for visualization or for digitization of points.
Resize to plot | Select to resize or not the background picture on whole size of plot.
On page center | Select to draw the background picture on page center or on left upper corner.

Density

Points density distribution | Select points density distribution formula. It is used in calculation of probability in <Distribution> mode. Contribution of each point is summarized according to point's radius, aspect ratio X/Y and points density distribution. By default - the Normal distribution (Gaussian).
Parameters | Points parameters are used in editing, scaling and building of distribution.
The density is proportional to the point area | It is used in calculation of probability in <Distribution> mode. Contribution of each point is summarized pro rata square of radius of point. By default - <is not proportional>.
Point size varies with a scale | It is used in scaling. By default - <is not varies>.

Distribution

Show | Choose the way of visualization of distribution. The Tones - brightness and color of cell is proportional density. The Vectors - arrows show the direction of growing of density.
Quality | Choose the quality of visualization of distribution. Practically, the size of cell is changed. By default <Optimal>.
Transparent | Use transparency, to x-ray background drawing See property page <Editor>.
By points color | By default distribution to density is built for points of each color. If <By points color> is unchecked, all color densities in cell are summarized.
Density Ranges | To select area with density of distribution in limits <min - max> choose color. Distribution is normalized on 100% at maximum.
Density, (% maximum) | By default distribution is normalized on maximum and is built in interval from 0 to 100%. Install new scales and color of distribution.
Log scale | By default brightness and color are proportional to density. Use logarithmic scale, to increase contrast. It is useful for maximums searching.

Diagram

Cell size, cm | Numbers of points, grouped on cells are displayed on diagram. Assign the cells sizes or use square cells.
Cells positions | Groups of points on diagram are displayed in circles (squares). Centers of circles can comply with centers of cells or are determined by mean (X, Y), calculated with points of a cell.
Symbols | Circle, square or none
Parameters | The parameters of visualization of diagram of distribution.
Label | Select to display or no total number of points in cell. By default - display.
Show center lines | Display or no median (X, Y), built on points of cell. By default - not to display.
Show trends lines | Display or no trends lines (X, Y), built on points of cell. By default - display.


Аctive Document

Certain applications allow interaction with another application via OLE (Object Linking and Embedding). Examples of such applications are Microsoft Word or Microsoft Excel. OLE allows the document of one application (the OLE server) to be placed (embedded) inside the document of another (the OLE container).

FindGraph has been designed to act as COM (OLE) server. This means, that WINDOWS registers format (extension 'fgr') as 'FindGraph.Document'. FindGraph’s documents (plots) can thus be added to a container and edited from within container just as easily as if they were being directly edited from within FindGraph . This is beneficial if you want to prepare the report with Word (Excel) and to layout many FindGraph’s plots on a single page.

To embed the plot in the container (for example, Excel), follow these steps:

  1. Click the button Copy Plot or select menu item <Edit><Copy Plot>.
  2. All plot will be put it on the Clipboard as OLE object.
  3. Open Excel.
  4. Click the button Paste or select Excel’s menu item <Edit><Paste>.
  5. FindGraph’s plot will appear as embedded object.

To activate and edit the object, double click inside FindGraph’s window. Excel’s menu and toolbar will been replaced by those of FindGraph , and the graph is ready for editing. To deactivate the object, and have Excel’s menus and toolbars revert to normal, left click anywhere inside Excel, but outside FindGraph’s window.

Notes

FindGraph is shipped with the program Crov.exe. It is the simple container of FindGraph’s and Excel’s objects . The program Crov.exe was designed to contain several plots on page of the format À4 for printing the report. Also some examples of usage of methods of automation are included.


Automation

The unique features of FindGraph are exposed through Automation (formerly called OLE Automation). Through the methods and properties that are exposed, client applications written in Microsoft Visual Basic® or Microsoft Visual C++® can be used to control the activities of FindGraph.

Properties:

Document: | see Plot options.
BSTR DocTitle | Plot header
BSTR DocComment | Plot footer
long DocWidth | Plot size on X, 0.1 mm
long DocHeight | Plot size on Y, 0.1 mm
boolean Visible | show/hide FindGraph application main window
Background picture: | See Editor options
boolean DocPictIs | Display or not the background picture
boolean DocPictCentered | To draw the background picture on page center or on left upper corner.
boolean DocPictStretch | Resize or not the background picture on whole size of plot
BSTR DocPictFileName | The background picture file (bmp, gif, jpg, wmf, emf)
Axes: | See Axes options
BSTR AxeXname | The axis X name
BSTR AxeXunit | Physical units of measurement of parameter X
double AxeXstart | The start of X
double AxeXscale | The scale of X in one cm
BSTR AxeYname | The axis Y name
BSTR AxeYunit | Physical units of measurement of parameter Y
double AxeYstart | The start of Y
double AxeYscale | The scale of Y
Series of Points: |
long CurrentDotsId | The unique identifier of a series
long ArrayId | Identifier of Variant array used to add at once some points to new series (see example)
VARIANT ArrayVar | Fill this array of dimension 3N with points (X, Y, Z) as VARIANT SAFEARRAY (see example)

Application methods:

void AppInit(short nVisible)
If will use VB you have to call AppInit(1) after CreateObject (see example)

  • nVisible - Show/Hide FindGraph main window

void AppQuit()
If will use VB you have to call AppQuit() on exit

SCODE OpenDocumentFile(BSTR lpctstr)
Opens an existing FinfGraph document

  • lpctstr - dovument to be opened, file with extension "fgr"

void DocUpdate()
Updates FindGraph window

Series of points methods

long DotsNew(short nColor, short nShape, short nWidth, double fAspect, BSTR lpctstrName)
Creates new series of points.

  • nColor - Number of color one of 6 possible:
    0 BLACK
    1 BLUE
    2 GREEN
    3 RED
    4 BROWN
    5 GRAY
  • nShape - Number of marker
    0 Cross
    1 Triangle
    2 Circle
  • nWidthDot - Radius of circle point, 0.1 mm;
  • fAspectDot - Aspect ratio: (Height Y) / (Width X);
  • lpctstrName - title of a series ;
  • return the unique identifier of a seriesdwId if success else -1

long DotsFromPict(short nColor, short nWidth, BSTR lpctstrName)
Digitizes background picture and creates new series of points.

  • parameters - see DotsNew()
  • return the unique identifier of a seriesdwId if success else -1

SCODE DotsAddPoint(long dwId, double fX, double fY, double fZ)
Adds a point to series

  • dwId - the unique identifier of a series, returned by DotsNew
  • fX, fY - values (X, Y) in physical units
  • return S_FALSE if there is no series with dwId

SCODE DotsAddPoints(long dwId, short nParam, VARIANT varray)
Adds array of points to series

  • dwId - unique identifier of a series, returned by DotsNew
  • var - one-dimensional SAFEARRAY:
  • nParam:
  • if nParam=2 - fX, fY in physical units in SAFEARRAY:
  • fX(0), fY(0), fX(1), fY(1), ... fX(n-1), fY(n-1)
  • if nParam=3 - fX, fY, fZ in physical units in SAFEARRAY:
  • fX(0), fY(0), fZ(0) ... fX(n-1), fY(n-1), fZ(n-1)
  • return S_FALSE if there is no series with dwId

SCODE DotsColorNumGet(long dwId, short* pnColorNum)
SCODE DotsColorNumSet(long dwId, short nColorNum)
Get/Set the number of color of series

  • dwId - the unique identifier of a series, returned by DotsNew
  • nColorNum - number of color (see DotsNew)
  • return S_FALSE if there is no series with dwId

SCODE DotsShapeGet(long dwId, short* pnShape)
SCODE DotsShapeSet(long dwId, short nShape)
Get/Set the number of marker of series

  • dwId - the unique identifier of a series, returned by DotsNew
  • nShape - number of marker (see DotsNew)
  • return S_FALSE if there is no series with dwId

SCODE DotsWidthGet(long dwId, short* pnWidth)
SCODE DotsWidthSet(long dwId, short nWidth)
Get/Set the radius of circle point of series

  • dwId - the unique identifier of a series, returned by DotsNew
  • nWidth - radius of circle point, 0.1 mm
  • return S_FALSE if there is no series with dwId

SCODE DotsAspectGet(long dwId, double* pfAspect)
SCODE DotsAspectSet(long dwId, double fAspect)
Get/Set the aspect ratio of series

  • dwId - the unique identifier of a series, returned by DotsNew
  • fAspect - aspect ratio Y/X
  • return S_FALSE if there is no series with dwId

SCODE DotsNameGet(long dwId, BSTR* lptstrName)
SCODE DotsNameSet(long dwId, BSTR lpctstrName)
Get/Set the title of a series

  • dwId - the unique identifier of a series, returned by DotsNew
  • lpctstrName - title of a series
  • return S_FALSE if there is no series with dwId

SCODE DotsShowLine(long dwId, short nShow)
Assigns to connect points with line or no.

  • dwId - the unique identifier of a series, returned by DotsNew
  • nShow - if 1 to connect points with line, if 0 not to connect
  • return S_FALSE if there is no series with dwId

long DotsColor(short nColorNum)
The return value specifies a RGB color calculated on the number of color.

  • nColorNum - number of color (see DotsNew)
  • return RGB

SCODE DotsUpdate(long dwId)
This updates the rectangle including all points of series.

  • dwId - the unique identifier of a series, returned by DotsNew
  • return S_FALSE if there is no series with dwId

SCODE DotsRemove(long dwId)
Removes series of points

  • dwId - the unique identifier of a series, returned by DotsNew
  • return S_FALSE if there is no series with dwId

Selection methods

Get selected dots. With SelectedGetStart we prepare buffer to keep dots. With SelectedGetStopwe free buffer. nParam unused now.

long SelectedGetStart(short nParam)
This prepares the buffer and fills it with points selected.

  • return the number of points in buffer

long SelectedGetStop(short nParam)
You have to call this to free memory

SCODE SelectedGetDot(double* pfX, double* pfY, double* pfZ)
Function gets point (X,Y,Z) and removes it from buffer (see example).

SCODE SelectedGetDots(short nParam, VARIANT* pvar)
Function gets array of all points (X,Y,Z) selected and removes array from buffer (see example).

  • pvar - pointer to one-dimensional SAFEARRAY:
  • nParam:
  • if nParam=2 - fX, fY in physical units in SAFEARRAY:
  • fX(0), fY(0), fX(1), fY(1), ... fX(n-1), fY(n-1)
  • if nParam=3 - fX, fY, fZ in physical units in SAFEARRAY:
  • fX(0), fY(0), fZ(0) ... fX(n-1), fY(n-1), fZ(n-1)
  • fX(0), fY(0), fZ(0) ... fX(n-1), fY(n-1), fZ(n-1)

double SelectedGetX(long num)
double SelectedGetY(long num)
double SelectedGetZ(long num)
This returns X (or Y or Z) value of selected point from buffer. First you have to prepare the buffer with SelectedGetStart.

  • num - number of point in buffer
  • return X

Areas methods

long ClipNewRect(short nColor, double fXstart, double fYstart, double fXend, double fYend)
Creates new rectangle area, named 'rect'

  • nColor - number of color
  • rect: (fXstart, fYstart), (fXend, fYend) - physical coordinates (X, Y) of marks
  • return current plot dwId if success else -1

SCODE ClipRemove(long dwId)
Removes area

  • dwId - the unique identifier of a series, returned by ClipNewRect
  • return S_FALSE if there is no series with dwId

long ClipNewEmptyRgn(short nColor)
Creates new empty area, named 'clip'. You have to add marks with SetArrayVar(var), or ClipNewRgnDot or ClipNewRgn.

  • nColor - number of color
  • return current plot dwId if success else -1

SCODE ClipNewRgnDot(long dwId, double fX, double fY)
Adds one mark to area.

  • dwId - the unique identifier of a series, returned by ClipNewEmptyRect
  • fX, fY - mark in physical units
  • return current plot dwId if success else -1

long ClipNewRgn(short nColor, VARIANT var)
Creates new area, named 'clip' with marks from VARIANT array.

  • nColor - number of color
  • var - one-dimensional SAFEARRAY of marks
  • Couples of points (fX, fY) in physical units in SAFEARRAY:
  • fX(0), fY(0), fX(1), fY(1), ... fX(n-1), fY(n-1)
  • return current plot dwId if success else -1

SCODE ClipNameSet(long dwId, BSTR lpctstrName)
Sets a title of area

  • dwId - the unique identifier of a series, returned by ClipNewRect
  • lpctstrName - title of area
  • return S_FALSE if there is no series with dwId

SCODE ClipSelect(long dwId, short nSelect)
Selects an area. All points inside of area will be selected.

  • dwId - the unique identifier of a series, returned by ClipNewRect
  • nSelect - 1 to select, 0 - to unselect
  • return S_FALSE if there is no series with dwId

See automation samples, fitting automation methods.


Fitting Automation Methods

The unique features of FindGraph are exposed through Automation (formerly called OLE Automation). Through the methods and properties that are exposed, client applications written in Microsoft Visual Basic® or Microsoft Visual C++® can be used to control fitting features of FindGraph.

Properties:

VARIANT ArrayVar
Array of dimension 3N with points (X, Y, Z) as VARIANT SAFEARRAY.

  • Input - Fill this array with data points (X, Y).
  • Output- FindGraph fills column Z with calculated values.

long ApprParamsNumber
Number of parameters M

  • Output - FindGraph fills this with the number of parameters.

VARIANT ArrayParams
Array of dimension M

  • Input - Fill this array with parameters.

String FuncApprString
String

  • Input - Use this string to send user DLL name.
  • Output- FindGraph fills this string with information about fitting model.

long Weighting
Number

  • Input - Use this value to set weighting schema.

    • 0 No weight, Wi = 1
    1 Statistical, Wi = 1/Yi
    2 Statistical, Wi = Yi
    3 Statistical, Wi = 1/Xi
    4 Statistical, Wi = Xi
    5 Instrumental, Wi = 1/Zi^2
    6 Direct, Wi = Zi

Methods

long FuncApprStart(short nFunctionId)
This prepares the buffer.

  • nFunctionId - fitting model identifier
  • return 1

long FuncApprEnd()
You have to call this to free memory

long FuncApprCreate(short nColor, short nWidth, BSTR lpctstrName)
Creates new curve fit.

  • nColor - Number of color one of 6 possible:
    0 BLACK
    1 BLUE
    2 GREEN
    3 RED
    4 BROWN
    5 GRAY
  • nWidthDot - width of line, 0.1 mm;
  • lpctstrName - curve fit title;
  • return the unique identifier of a curve fit functiondwId if success else -1

double FuncApprInPoint(long dwId, double x)
Calculates value of function in point x.

  • dwId - the unique identifier of a curve fit function returned by FuncApprCreate;
  • x - X value;
  • return Y value calculated.

double GetApprPara(short num)
Returns value of parameter.

  • num - parameter number;

Sample

To fit your data, follow these steps:

  1. FuncApprStart(nIdFunc)
     nFunctionId- fitting model identifier.
  2. Use variant array vaPoints. Fill array va[3N] of dimension 3N with data points (X, Y, Z).
    vaPoints = FindGraph.ArrayVar
  3. Use variant array vaParams. Fill array va[M] of dimension M with parameters.
    vaParams = FindGraph.ArrayParams
  4. Fit data and create new curve.
    dwFunc = FuncApprCreate(nColor, nWidth, Name)
  5. Free memory
    FindGraph.FuncApprEnd();
  6. Calculate value of function in point x.
    FuncApprInPoint(dwId, x)

By using Automation, the following sample, written in Visual Basic, demonstrates how to fit your data. See project and testApprVB.exe in directory testApprVB. This runs program FindGraph in new window.

Fitting model identifiers

 | Regression:
0 | Polynomial f(U) = a0 + a1*U + a2*U^2 + ...
2 | Hyperbolic f(U) = a0 + a1/U + a2/U^2 + ...
4 | Logarithmic f(U) = a0 + a1*ln(U) + a1*ln(U)^2 + ...
6 | Power ln(f) = a0 + a1*ln(U) + a1*ln(U)^2 + ...
8 | Exponential ln(f) = a0 + a1*U + a2*U^2 + ...
10 | Linear Regression
20 | Piece linear
32 | B Spline curve
38 | Parametric curve
50 | Logistic model
51 | Gompertz model
60 | Fourier approximation
70 | Neural network rational sigmoid
71 | Neural network exp sigmoid
80 | User defined function
88 | Non-linear least-square fitting (predefined function)
90 | Non-linear least-square fitting (your Formula)

See Fitting Models for details.

Parameters

In all models:
vaParams(0) 0 - y=f(x), 1 - x=f(y)

Regression (Polynomial, Hyperbolic, Logarithmic, Power, Exponential):
vaParams(1) Order for regression line or 0

Linear Regression:
vaParams(1) | Must be 1
vaParams(2...11) | Polynomial, V(U) = V0 + a11*(U-U1)/W1+ a12*((U-U1)/W1)^2 + ...,
 | vaParams(2) = U1, vaParams(3) = W1, vaParams(3+i) = 1, if use a1i
vaParams(12...21) | Rational, V(U) =... + a21*W2/(U-U2) + a22*(W2/(U-U2))^2 + ...,
 | vaParams(12) = U1, vaParams(13) = W1, vaParams(13+i) = 1, if use a2i
vaParams(22...31) | V(U) =... + a31*sqrt(W2/(U-U2)) + a32*sqrt(((U-U2)/W2)) + ...
 | vaParams(22) = U1, vaParams(23) = W1, vaParams(23+i) = 1, if use a3i
vaParams(32...41) | Logarithmic, V(U) =... + a41*ln (U-U4)/W4 + a42* (ln((U-U4)/W4)^2 + ...
 | vaParams(32) = U1, vaParams(33) = W1, vaParams(33+i) = 1, if use a4i
vaParams(42...51) | Exponential, V(U) =... + a51*exp(U-U5)/W5 + a52* exp(2*(U-U5)/W5) + ...
 | vaParams(42) = U1, vaParams(43) = W1, vaParams(43+i) = 1, if use a5i
vaParams(52...61) | Fourier, V(U) =... + a61*sin(U-U6)/W6 + a62* sin(2*(U-U6)/W6) + ...
 | vaParams(52) = U1, vaParams(53) = W1, vaParams(53+i) = 1, if use a6i
vaParams(62...71) | Polynomial, V(U) = V0 + a11*(U-U1)/W1 + ...,
 | V(U) =... + a71*cos(U-U6)/W6 + a72* cos(2*(U-U7)/W6) + ...
 | See Linear Regression for details.

Piece linear:
vaParams(1) | Number of steps
vaParams(2...11) | Polynomial

Fourier approximation:
vaParams(1) Number of harmonics

Neural network approximations:
vaParams(1) | Number of neurons
vaParams(2) | Parameter A
vaParams(3) | Step
vaParams(4) | Maximum number of iterations

User defined function:
vaParams(1) | Unused, must be 1
vaParams(2) | Parameter 1
vaParams(3) | Parameter 2
vaParams(4) | Parameter 3
vaParams(5) | Parameter 4
FuncApprString | DLL name in directory "APPR", "POLI_N.DLL" for example

B-Spline curve:
vaParams(1) | Unused, must be 1
vaParams(2) | Unused, must be 0
vaParams(3) | 0 - Least squares approximation, 1 - Interpolation
vaParams(4) | If 1 - closed curve
vaParams(5) | Number of control points: 1-12
vaParams(6) | Degree: 1-6

Parametric curve:
vaParams(1) | Unused, must be 1
vaParams(2) | Center point X value, if 'Fixed center'
vaParams(3) | Center point X value
vaParams(4) | If 1 - 'Fixed center' is used
vaParams(5) | Number of sin(u), cos(u) harmonics: 1-6
vaParams(6) | Number of base points: 8-256

Non-linear Fitting:
vaParams(1) | Unused, must be 1
vaParams(2) | Fitting curve Equation, parabola + sqrt for example
vaParams(3) | Fitting Model, polynomial for example
vaParams(4) | Step
vaParams(5) | Number of Iterations
vaParams(6) | Model, 0 - Simplex, 1 - Gradient
vaParams(7) | If > 0 - Normalize X
vaParams(8) | Initial value of parameter A
vaParams(9) | Initial value of parameter B
vaParams(10) | Initial value of parameter C
vaParams(11) | Initial value of parameter D
vaParams(12) | Initial value of parameter G
vaParams(13) | If > 0 - Fixed parameter A
vaParams(14) | If > 0 - Fixed parameter B
vaParams(15) | If > 0 - Fixed parameter C
vaParams(16) | If > 0 - Fixed parameter D

Formula: All parameters as for Non-linear Fitting.
FuncApprString Formula, "a + b*u + c*u*u + d*sin( u )" for example

See Fitting Parameters for details.

Nonlinear Fitting Models

1000 | Polynomial
2000 | Exponential
3000 | Logarithm
4000 | Power
5000 | Hyperbola
6000 | Rational
7000 | Sigmoidal
8000 | Peak
9000 | Waveform
10000 | Asymptotic

Nonlinear Fitting Equations

Polynomial
1010 | Const
1020 | Straight Line
1030 | Parabola
1040 | Polynomial4
1050 | Polynomial5
1060 | ParabolaSqrt
1070 | PolynomialSqrt 3
1080 | PolynomialSqrt 4

Exponential
2010 | Exponential 1
2020 | Exponential 2-1
2030 | Exponential 2-2
2040 | Exponential 2-3
2050 | Exponential 2-4
2060 | Exponential3
2070 | Stirling
2100 | Exp Decay 4
2110 | Exp Decay 5
2120 | Exp2 Decay 5
2200 | Exp Growth 3
2210 | Exp Growth 4
2220 | Exp2 Growth 5-1
2230 | Exp2 Growth 5-2
2300 | Modified Exponential 2
2310 | Modified Exponential 3
2320 | Exp and Linear
2330 | Shah
2340 | Yeild-fertilizer
2350 | Vapor Pressure Model
2360 | Exp Gauss

Logarithm
3010 | Logarithm 1
3020 | Logarithm 2-1
3030 | Logarithm 2-2
3040 | Logarithm 3
3050 | Bradley

Power
4010 | Power Fit
4020 | Allometric
4030 | Shifted Power 2
4040 | Shifted Power 3
4050 | Shifted Power 4
4060 | Gamma
4070 | Geometric
4080 | Modified Geometric
4100 | Root Fit
4110 | Hoerl
4120 | Freundlich
4130 | Gunary
4140 | Langmuir
4150 | Pareto

Hyperbola
5010 | Saturation Growth
5020 | Double Hyperbola
5030 | Generalized Hyperbola
5040 | Bent Hyperbola
5050 | Heat-Capacity Model
5060 | Inverse

Rational
6010 | Rational 2
6020 | Rational 3
6030 | Rational 4
6040 | Nelder
6050 | BET

Sigmoidal
7010 | Gompertz Model
7020 | Logistic Model
7030 | Richards Model
7040 | Boltzmann
7050 | Weibull
7060 | MMF Model
7070 | Hill
7080 | Logistic 4

Peak
8010 | Beta Distribution
8020 | Extreme
8030 | Gaussian
8040 | Log Normal
8050 | Logistic Peak
8060 | Lorentz Equation
8070 | Lorentz Peak
8080 | Bell
8090 | Pulse

Waveform
9010 | Sinusoidal Fit
9020 | Sine
9030 | Sine Damp
9040 | Sine Sqr
9050 | Truncated Fourier

Asymptotic
10010 | Asymptotic 1
10020 | Asymptotic 2-1
10030 | Asymptotic 2-2
10040 | Asymptotic 3-1
10050 | Asymptotic 3-2
10060 | Monomolecular 3-1
10070 | Monomolecular 3-2
10080 | Box Lucas 2-1
10090 | Box Lucas 2-2
10100 | Chapman
10110 | Power Asymptotic 2-1
10120 | Power Asymptotic 2-2
10200 | Reciprocal Model
10210 | Reciprocal Quadratic
10220 | Reciprocal Logarithm
10230 | Bleasdale-Nelder3
10240 | Bleasdale-Nelder4
10250 | Harris

See documentation on methods and properties.


FindGraph Menu

Menu

File | Import/Export, Print
Edit | Undo/Redo, Copy
View | Toolbars
Data | Import, Export, Correlation
Plot | Options, Modes
Fit | Regression, Curve fitting, Functions
Analysis | Trace Data and Functions, Transformations, Filters, Smooth
List | Objects: data, areas, functions, commentaries
Help | Help, Register
Status | Status Bar


File

new | New | Create a new plot
open | Open | Open an existing document 'FGR'
 | Append | Append an existing document 'FGR' to the current active document.
save | Save | Save the active document with extension 'FGR'
 | Save As | Save the active document with a new name
 | Save As Image | Save the active document as image (Bitmap or JPG file)
print | Print | Print the active document
preview | Preview | Display full page in that type, which it will be printed
 | Print Setup | Change the printer and printing options
 | Exit | Quit the application.


Edit

undo | Undo | Undo the last command.
redo | Redo | Redo the previously undone command.
 | Restore Settings | Restores the dialog windows sizes and positions to default values.
 | Copy Plot | Copy the plot as OLE object and put it on the Clipboard. You can paste it to 'Paint', 'Word', 'Excel' and save the plot as picture or edit it as embedded object.
 | Copy As Bitmap | The plot will be placed on the Windows Clipboard as bitmap image, and may be pasted in elsewhere.
 | Unselect All | Unselect all areas.
 | Points Editor | Drop and erase points with Points Editor. Drop Points Points on Lines Erase Points
 | Areas | Create and remove areas Rectangle Area Irregular Area Brushed Area Remove Area Marks Remove Areas.
 | Commentary | Create new text commentary or edit existing.
 | Select Area | Click on the area to select.
 | Information | Click to scroll plot, and to show information on areas, data and functions.


View

 | Standard Toolbar | Show or hide the toolbars: Standard Graphing Objects Data Edit
 | Status Bar | Show/Hide the Status Bar.
 | Restore Settings | Restore windows coordinates to initial values.
table | Scales Window | Show/Hide the Scales window.
table | Fitting Log | Show/Hide the Fitting Log window.
 | Number of Points | Show/Hide the Window with information about number of points and variables distribution.
table | Conversion Window | Show/Hide 'Conversion' Window.
 | Grid | Show/Hide screen grid.


Points

Data

new | Add from Table... | Create new series and add points from table.
open | Add from File... | Create new series and add points from text file extension 'TXT'.
from pict | Add from Screen... | Digitize new series of points from screen.
bplscre.gif (915 bytes) | Add from Picture | Digitize new series of points from background picture.
paste | Paste Points ... | Create new series and add points from the Clipboard.
save | Save Points As... | Save only points in text file.
copy | Copy Selected | Copy only points to the Clipboard.
 | Remove Selected | Remove all selected points
table | Table | View all data in one table.


Plot

Fit to Window | Fit to Window | Recalculate plot size to use full workspace.
 | Fit scales to all data | Recalculate scales to view all data.
Fit scales to 0-1 | Fit scales to limits 0 - 1 | Recalculate scales to view data in X, Y limits from 0 to 1.
Fit scales to Points | Fit Scales to Points | Recalculate axis scales to view all points selected.
Fit scales to Area | Fit Scales to Area | Recalculate axis scales to view all areas selected.
options | Options... | Change plot Properties.
 | Picture... | Background picture properties.
 | Legend | Paint the 'Legend'.
edit | Points Editor | Switch to view Points Editor.
dew | Occupation | Switch to view Points Occupation.
histo | Distribution | Switch to view Density Distribution.
stat | Diagram | Switch to view Diagram.
table | Polar coordinates | View and edit data points in polar coordinates.


Points

Fit

 | Weighting Scheme... | Weighted fitting
function | Fit Function... | Approximate function on selected points
best function | Best Function... | Find best fit function on selected points
function | Linear Regression... | Linear Regression on selected points
interpolation | Interpolate... | Interpolate selected points
formula | Formula... | Function on Formula
famous functions | Famous Functions... | Library of 2-D curves


Points

Analysis

trace data | Trace Data... | Values, derivatives, integrals, peaks.
Transformation | Transformation... | Transform selected points.
 | Normalize | Normalize data between Y limits you define.
 | Subtract... | Find and extract baseline.
 | Smooth... | Smooth selected points.
 | Filter... | Filter selected points.
 | Convolution... | Apply the convolution or the correlation.
 | Extract cyclic... | Extract periodic signals.
distances | Distances... | Distances.
correlation | Correlation... | Correlation of selected points.
trace function | Trace Function... | Values, derivatives, integrals.


Graphing

edit | Points Editor | Switch to view Points Editor.
dew | Scatter diagramm |
dew | Plot lines |
dew | Occupation | Switch to view Points Occupation.
histo | Distribution | Switch to view Density Distribution.
histo | Vectors | Draw vectors of density gradients or density distribution.
stat | Diagram | Switch to view Diagram.
table | Polar coordinates | View and edit data points in polar coordinates.
table | Conversion Window | Show/Hide 'Conversion' Window.
stat | Legend | Paint the 'Legend'.
stat | Picture | Show/Hide background picture.


List

points | List of Series of points with Parameters
areas | List of Areas with Parameters
functions | List of Functions with Parameters
commentaries | List of Commentaries with Parameters

To select the objects in the list, click on the object.

To remove the object or to edit its parameters, double click on the object.

To call the popup menu, select the objects, then click right button. It is possible:

  • To remove all selected objects (series, areas, functions, commentaries).
  • To combine selected series of points to one series. The color and the marker of points in new series will be as in first selected.


Help

topics | Help Topics | Display the help topics
 | Web Site | Open UNIPHIZ Lab home page
 | Technical Support | Mail to support: support@uniphiz.com
 | Purchase | Open the purchase page
 | Register ... | Display the information about program registration
about | About ... | Display the program information, version number and copyright
what is |  | Press this button and click the mouse on interesting button of the program


Status

Status Bar

Cursor coordinates and square of areas are in screen units (centimeters or inches). You can change screen units in options dialog <Plot><Options> on the page <Page>.

Values X, Y in physical units of axes are imaged on the Editor toolbar.

The area is summarized on all areas selected.


How to...

Import points | How to collect the points
Digitize | How to digitize
Export points | How to export the points
Save as picture | How to save the plot as a picture
Approximation | How to build approximation line
Editor | How to add, move and erase the points
Commentary | How to add commentary
Statistics | How to calc the correlation
Zoom | How to zoom the area you selected
Automation | The samples of automation using


How to collect points

There are different ways to collect points:

  • Take the points from the Clipboard;
  • Read the points from text file;
  • Digitize from the screen or background picture;
  • Automation.

How to take the points from the Clipboard

The Clipboard must contain data in text format. For example, Excel rows were copied on the Clipboard or FindGraph’s points were copied. Follow these steps:

  1. Put points on the Clipboard. In Excel select some cells and click the button Copy or select menu item <Edit><Copy>.
  2. In FindGraph click the button Paste Points or select menu item <Data><Paste Points...>.
  3. The Wizard of Creation starts.
  4. Follow 4 steps of 4.
  5. It creates new series of points with current color and marker.
  6. Series, named 'Data from Clipboard', will appear in list.

How to read the points from text file

Follow these steps:
  1. Click the button Add Points from File or select menu item <Data><Add from File...>.
  2. The dialog "Open file" will appear. Select the file with extension 'TXT'.
  3. The Wizard of Creation starts.
  4. Follow 4 steps of 4.
  5. It creates new series of points with current color and marker.
  6. Series, named as file, will appear in list.

Notes:

  • The points in file must be delimited with Space, Tab, Comma, ';' or '|'.


How to digitize

It is possible to digitize and add new series of points:

  • from background picture.
  • from screen;

How to digitize background picture

Only points inside selected areas will be digitized. Follow these steps:

  1. Select menu item <Plot><Picture> or click the button [image] and select background picture. It supports bmp, gif, jpg, wmf and emf formats.
  2. The picture on plot will appear.
  3. Create some areas 'Clip' or 'Rectangle' around picture.
  4. To select these areas, use the button Select Area.
  5. Choose current color. Only points with this color will be digitized.
  6. Choose current points radius. It will be the size of pixel groups to digitize.
  7. Click the button Add Points from Picture or select menu item <Data><Add from Picture>.
  8. The Wizard of Digitization will start.
  9. Follow steps 1-2-3-4-5-6.
  10. On steps 1 and 2 select mapping region, and set the scales.
  11. On steps 3 and 4 screen graphs are handled automatically.
  12. On step 5 you can manually add single data points and remove mistakes.
  13. It creates new series of points with current color and marker.
  14. Series, named as picture file, will appear in list.

Trick: To select areas accurately and to exclude possible mistakes use 'Brushed Area' tool.

How to digitize screen points

You have not to capture screenshots before digitizing. Follow these steps:

  1. Click the button Add Points from Screen or select menu item <Data><Add from Screen...>.
  2. The framework appears.
  3. To select the rectangle of digitizing, move the framework on screen. For precise positioning of the framework, use the arrows keys. To resize the framework, hold 'Shift' key and use the arrows keys.
  4. To select the color of digitizing, Hold the key 'C' and move the mouse inside framework. The selected color will appear on framework caption.
  5. To digitize, press the button <o> on frame.
  6. The Wizard of Digitization will start.
  7. Follow steps 2-3-4-5-6.
  8. On step 2 set the scales.
  9. On steps 3 and 4 screen graphs are handled automatically.
  10. On step 5 you can manually add single data points.
  11. It creates new series of points with current color and marker.
  12. Series, named 'Screen', will appear in list.
  13. Close the Wizard.
  14. Remove mistakes with editor.

Read about Wizard of Digitization.


How to export points

The program allows to export information to the other programs and files:

  • Copy selected points, put it on the Clipboard.
  • Save to TXT file as ASCII table;
  • Save to XML file;
  • Automation.

How to copy the points and put it on the Clipboard

To copy all selected points, follow these steps:

  1. Create some areas 'Clip or 'Rectangle' around points.
  2. To select these areas, use the button Select Area.
  3. Click the button Copy Points or select menu item <Data><Copy Selected>.

To copy only points with current color, follow these steps:

  1. Create some areas 'Clip or 'Rectangle' around points.
  2. To select these areas, use the button Select Area.
  3. Select current color.
  4. Click right button on area. Popup menu will appear.
  5. Select item <Copy selected ... points>.

The Clipboard will contain data in text format as table X, Y, Z. You can paste it to Excel page or add points to series of points.

How to save points to text file

To save plot in 'txt' format as ASCII table, follow these steps:

  1. Create some areas 'Clip or 'Rectangle' around points.
  2. To select these areas, use the button Select Area.
  3. Click the button Save Points or select menu item <Data><Save Points As>.
  4. The dialog "Save file" will appear. Select the file with extension 'TXT'.
  5. The dialog "Save the points to text file" will appear.
  6. Select text information to write.
  7. Use 'File preview' window to control.

You can use FindGraph or Excel to read points saved.

How to save points to XML format

To save plot in XML format, follow these steps:

  1. Create some areas 'Clip or 'Rectangle' around points.
  2. To select these areas, use the button Select Area.
  3. Click the button Save Points or select menu item <Data><Save Points As>.
  4. The dialog "Save file" will appear. Select the file with extension 'XML'.
  5. The dialog "Save the points to XML file" will appear.
  6. Select text information to save.

Additionally to points, selected areas, the functions of approximation and the commentary will be saved. Template file 'findgraph.dtd' is used.


How to save plot as picture

Often, there will be a requirement to display FindGraph’s plots in another application such as a word processor or spreadsheet. A way is to add a graph as an embedded object to an OLE container such as Microsoft Word or Microsoft Excel.

To save the plot as image (Window Bitmap or JPG files), select menu item <File><Save As Image>.

To save the plot in the graphic format (gif, for example), let paste this plot to MS Paint. Follow these steps:

  1. Click the button Copy Plot or select menu item <Edit><Copy Plot>.
  2. All plot will be put it on the Clipboard as OLE object.
  3. Open MS Paint (PBrush).
  4. Click the button Paste or select menu item <Edit><Paste>.
  5. Save it as picture in graphic format, which WINDOWS supports.


How to build approximation line

Examples:

  • Regression line through a series of points
  • Neural network
  • Non-linear fitting
  • Find best curve fit
  • Spline through all points inside area
  • Sections through all red points inside selected area

Regression line through a series of points

Follow these steps to build the regression line:

Regression line
  1. To select series of points in list, double click on it.
  2. The dialog 'Information on points series' will appear.
  3. Click the button <Function...>
  4. The Wizard of approximation starts.
  5. On a step 1 we choose relation Y = f( X ).
  6. On a step 2 we choose 'Regression line'.
  7. On a step 3 we choose ''Polynomial'.
  8. On a step 4 we select polynomial degree 1.
  9. Recalculate.
  10. Put information string on the Clipboard.
  11. On a step 5 we select color and width of line.
  12. Regression line was build.
  13. Click button Commentary and paste information string.

Using the neural network approximation

Follow these steps to use the neural network:

Neural network was used
  1. To select series of points in list, double click on it.
  2. The dialog 'Information on points series' will appear.
  3. Click the button <Function...>.
  4. The Wizard of approximation starts.
  5. On a step 1 we choose relation Y = f( X ).
  6. On a step 2 we choose 'Neural network'.
  7. On a step 3 we choose 300 iterations.
  8. On a step 4 we select 20 neurons.
  9. Recalculate.
  10. If failed, we select 12 neurons.
  11. Recalculate.
  12. On a step 5 we select color and width of line.
  13. Approximation line was build.

Using the non-linear fitting

Follow these steps to use the non-linear fitting:

Non-linear fitting was used
  1. To select series of points in list, double click on it.
  2. The dialog 'Information on points series' will appear.
  3. Click the button <Function...>.
  4. The Wizard of approximation starts.
  5. On a step 1 we choose relation Y = f( X ).
  6. On a step 2 we choose 'Non-linear'.
  7. On a step 3 we input desirable formula with parameter (a) Y( u ) = u + a*sin(u).
  8. Define initial values of the fitting parameters and click the button <Preview>.
  9. New graph will appear. See how fit curve conforms your data.
  10. On a step 4 recalculate. It may take a lot of time for slow computers.
  11. On a step 5 we select color and width of line.
  12. Approximation line was build.

Important: The expression must be composed from internal functions (see formula for more details), operators and only following parameters: a, b, c, d. The result of your fitting session critically depends on initial values of parameters.

Examples:

  • Y( u ) = a + b*u^2.5 + c*u^4;
  • Y( u ) = a + b/u + c * exp( u/10 );
  • Y( u ) = 5+ a*besselj0( u );
  • Y( u ) = 5+ a*normal( u, c);

Trick: View Log Fitting Window to discover the best model to describe your data.

Best curve fit

Follow these steps to find the best curve fit:

Best curve fit
  1. To select series of points in list, click on it.
  2. select menu item <Fit><Best Function> or click on button best function.
  3. The Wizard starts.
  4. On a step 1 we choose X and Y ranges.
  5. On a step 2 we check groups of functions.
  6. On a step 3 we click on button Start. Fitting process will run. It may take a lot of time for slow computers.
  7. New graphs will appear. See how fit curves conform your data.
  8. Select the number of best fit functions to plot. Only this functions will be saved.
  9. Several approximation lines were build.

B-spline through all points inside area

Follow these steps to build the B-spline:

Spline
  1. Select [image] and create area around points.
  2. Select editor mode
  3. Click left inside the rectangle area.
  4. The dialog 'Information on selected area' will appear.
  5. Click the button <Function...>
  6. The Wizard of approximation starts.
  7. On a step 1 we choose relation Y = f( X ).
  8. On a step 2 we choose 'B-spline'.
  9. On a step 4 we select the power and the number of control points of B-spline.
  10. On a step 5 we select color and width of line.
  11. Spline was build.

Sections through all red points inside selected area

Follow these steps to build the sections:

Sections
  1. Select [image] and create area around points.
  2. Use [image] to select area.
  3. Select the current color - red
  4. Click right button on area. Popup menu will appear.
  5. Select item <Function through red selected points>.
  6. The Wizard of approximation starts.
  7. On a step 1 we choose relation Y = f( X ).
  8. On a step 2 we choose 'Sections'.
  9. On a step 4 we select nodes of net 50.
  10. On a step 5 we select color and width of line.
  11. Sections were build.


How to build parametric graph

Follow these steps to build 3 parametric graphs on the formula Y = x + sin( x+v ), with parameter v = 0, 1, 2:

  1. Click the button Formula or select menu item <Analysis><Add Function>.
  2. The dialog 'Build Function on Formula' will appear.
  3. On a page Formula we input formula Y = u + sin( u+v ), X = u.
  4. Select limits of u as range of X.
  5. On a page Parameters we select 'use' parameter v.
  6. Assign range of parameter v: Min=0, Max=2, Step=1.
  7. On a page Line we select color and width of line.
  8. Input name of graph as formula.
  9. Use the button <Apply> as Preview.
  10. Three graphs will appear.

Examples:

  • Y( u ) = 2+u/3+ cos( u ) * 2; X( u ) = u/5;
  • Y( u ) = 5+ besselj0( u ); X( u ) = sqrt( u );
  • Y( u ) = 50*normal( u, 2 ) + sin( u*3 ); X( u ) = u;
  • Y( u ) = 10*normal( u, v ); X( u ) = u; v: 1,2,3;

See samples Formula1.fgr.


How to transform points

How to transform points and create new series

Follow these steps to build Affine transformation:

  1. To select series of points in list, double click on it.
  2. The dialog 'Information on points series' will appear.
  3. Click the button <Transform...>
  4. The dialog Transform selected points to new series... starts.
  5. On a page Formula we choose relations Y( u, v )=v*16/(u*u + v*v) and X( u, v )=u*16/(u*u + v*v).
  6. On a page Series we select color, marker, and radius of points.
  7. Input series title.
  8. Use the button <Apply> as Preview.
  9. New series of points will appear. See sample Affine.fgr.

Follow these steps to subtract regression line:

  1. To select series of points in list, double click on it.
  2. The dialog 'Information on points series' will appear.
  3. Click the button <Function...> and build the regression line Y( x ) = Yappr(x).
  4. Click the button <Transform...>
  5. The dialog Transform selected points to new series... starts.
  6. On a page Formula we choose relations Y( u, v ) = v - a + b and X( u, v ) = u.
  7. Select parameter a = Yappr.
  8. Select parameter b = Medium Y.
  9. On a page Parameters we vary parameter c = 0.
  10. On a page Series we select color, marker, and radius of points.
  11. Input series title.
  12. Use the button <Apply> as Preview.
  13. New series of points will appear. See sample Deviation.fgr.

Examples:

  • Y( u, v ) = 4/v; X( u, v ) = 4/u;
  • Y( u, v ) = v*16/(u*u + v*v); X( u, v ) = u*16/(u*u + v*v);
  • Y( u, v ) = v/ a + b; X( u, v ) = u; a = approximation y( x ), b = Ymedium;
  • Y( u, v ) = (v-a + b)/c; X( u, v ) = u; a, b, c - formulas.


How to add, move and erase points

To move the area:

  1. Click the button Rectangle Area or the button Irregular Area.
  2. Hold 'Shift' key and click left inside the area.
  3. Hold left button and move the area.

To remove the area:

  1. Select 'List of Areas' areas .
  2. Double click on the object.
  3. The dialog 'Information on selected area' will appear.
  4. Click the button <Remove>.

To remove areas marks:

  1. Click the button Remove Area.
  2. Select current color as color of the area.
  3. Hold left button and erase the marks.

Notes:

  • Area will be deleted, if remain less four marks.

  • Hold 'Shift' key to remove marks of any area.

To remove the points:

  1. Click the button Erase Points.
  2. Select current color as color of the points.
  3. Hold left button and erase the points.
  4. Only the points with current color will be removed.

Notes:

  • Hold 'Shift' key to remove points of any color.

To move the group of points:

  1. Create an area around points.
  2. To select the area, use the button Select Area.
  3. Select current color.
  4. Click left inside the area, hold left button and move the area.
  5. The area and all points with current color inside the area will be moved.

Notes:

  • To move all selected points, hold 'Shift' key when move.

To remove the group of points:

  1. Create some areas 'Clip or 'Rectangle' around points.
  2. To select this areas, use the button Select Area.
  3. Select current color.
  4. Click right button on area. Popup menu will appear.
  5. Select item <Remove selected ... points>.
  6. All selected points with current color will be removed.

Notes:

  • To remove selected points with current color, use 'Delete' key instead popup menu.
  • To remove all selected points, use 'Shift' and 'Delete' keys.


How to add commentary

To add a simple commentary:

  1. Click the button Commentary.
  2. Click left on page.
  3. The dialog Commentary will appear.
  4. Input some text and click the button <Input>.
  5. The commentary will appear.
  6. Vary the parameters and the indent.
  7. All changes display in a screen.

To move the commentary, click left inside the commentary, hold left button and move it. To edit existing commentary, double click on it.

To place the labels along curves, follow these steps:

  1. Add a simple commentary (see above).
  2. In the dialog Commentary select <Draw text> checked.
  3. The button <Draw it now> will be enabled. Click it.
  4. Cursor with a pen will appear.
  5. Hold the left button and move the mouse on screen, until will end the letters.

Notes:

  • The position of commentary is recalculated when scaled.


How to calc correlation factor

How to calc the correlation

To estimate the correlation of selected points, follow these steps:

  1. Create some areas 'Clip or 'Rectangle' around points.
  2. To select these areas, use the button Select Area.
  3. Click the button Correlation or select menu item <Data><Correlation...>.
  4. The dialog Points (X, Y) correlation will appear.
  5. Click the button <Ellipse...>, to build the Confidence ellipse of correlation of points with colors you selected.


How to zoom the area you selected

Scales of axes, i.e. the relation of physical units to screen, is set in options dialog <Plot><Options> on the page <Axis>. Use the Scales window to change the scales of X and Y axes.

Sometimes it is interesting to view all area you selected. Follow these steps:

  1. Create an area 'Clip or 'Rectangle' around points.
  2. Click the button Magnifying Glass.
  3. Left click inside the area.
  4. The scales of X and Y axes will be recalculated, so all area will be on page.

To restore the initial scales, click the button Magnifying Glass next time.

Notes:

  • The positions of points, areas and commentaries are recalculated.
  • The points density distribution will be recalculated.
  • The position of background picture does not change.
  • The sizes of points may be changed or not. It depends upon points parameters. See the page <Density> of options dialog.


Automation use samples

MS Visual Basic sample see in directory TestVB.
MS Visual C++ sample see in directory TestVC.

To add one point to new series, follow these steps:

  1. Create new series
    dwId = FindGraph.DotsNew(     Color, Shape, Width, Aspect, Name)
    See The parameters of series,
    dwId - identifier of a series.
  2. Add single point to series with dwId
    FindGraph.DotsAddPoint( dwId, X, Y, Z)
  3. Repaint points
    FindGraph.DotsUpdate(dwId)

To add at once some points to new series, follow these steps:

  1. Create new series
    dwId = FindGraph.DotsNew(     Color, Shape, Width, Aspect, Name)
  2. Use variant array. Set the identifier of a series
    FindGraph.ArrayId = dwId
  3. Fill array va[3N] of dimension 3N with points (X, Y, Z).
  4. Add at once array to series with dwId
    FindGraph.ArrayVar = va
  5. Repaint points
    FindGraph.DotsUpdate(dwId)

To create rectangle area and to select it, follow these steps:

  1. Create rectangle area
    dwId = FindGraph.ClipNewRect( Color, Left, Top, Right, Bottom)
    Left, Top, Right, Bottom -     physical coordinates (X, Y) of marks.
  2. Select all points in area dwId
    FindGraph.ClipSelect( dwId, 1)

To get single selected point, follow these steps:

  1. Copy selected points (X, Y, Z) and put it on the buffer.
    N = FindGraph.SelectedGetStart( 0)
     N - number of points selected.
  2. In cycle we choose points:
    for i=1 to N
    X = SelectedGetX(i)
    Y = SelectedGetY(i)
    Z = SelectedGetZ(i)
    next i
  3. Free memory
    FindGraph.SelectedGetStop( 0);

To get whole array of selected points at once, follow these steps:

  1. Copy selected points (X, Y, Z) and put it on the buffer.
    N = FindGraph.SelectedGetStart( 0)
     N - number of points selected.
  2. Use variant array va. Fill array va[3N] of dimension 3N with points (X, Y, Z).
    va = FindGraph.ArrayVar
     array dimension (UBound(va) + 1) / 3
  3. Free memory
    FindGraph.SelectedGetStop( 0);

To display picture and digitize it, follow these steps:

  1. Display the background picture.
    FindGraph.DocPictFileName = strFileName
  2. Create rectangle area with color number 2.
    dwIdArea = FindGraph.ClipNewRect(Color, fLeft, fTop, fRight, fBottom)
  3. Select area.
    FindGraph.ClipSelect(dwIdArea, 1)
  4. Digitize points inside rectangle.
    FindGraph.DotsFromPict(Color, Width, "FromPict")
  5. Free memory
    FindGraph.SelectedGetStop( 0);

Microsoft Visual Basic 6.0 sample

See subdirectory TestVB or VB sample.

Microsoft Visual C++ 6.0 sample

See subdirectory TestVC or VC sample.

See documentation on methods and properties.


Contact Author

Please visit the program home page at:

http://www.uniphiz.com/

to download the current version and find out more about the program.

If you have any problems, comments or suggestions or would like more information, email at :

support@uniphiz.com

Please inform us about the following:

  • Program version (from About);
  • Windows version (including service packs and other fixes installed), US or international, OEM or not;
  • Launched applications.
  • Description of your problem (as much information as possible to retrieve the problem).

We'll try to help you as quickly as possible.

.

.

Credits:

Spell-checking program help texts and site pages - Paul Jones pjones46@attbi.com


Scales Window

The Scales Window

Scales Window Use this window to change scales of X, Y axes.

Click buttons or use keyboard arrows, to move counting out on 1 step of scale.

Move sliders or use keyboard arrows and hold 'Shift' key, to change scales within from 0.1 to 10 of axes scales.

Trick: To show/hide the Scales window quickly, click left in area of X, Y axes.


Color of points and areas

Select color from 6:

Black
Blue
Green
Red
Brown
Gray

The difference of points on color is used:

  • When creating the new series of points;
  • When creating the new areas;
  • When removing points <Erase Points>;
  • When removing points inside selected areas;
  • When moving points with selected areas;
  • When copy selected points on the Clipboard;
  • When building the functions through points.

When click color button, the new series of points begins.


Conversions and Polar coordinates

Select menu item <View><Conversion Window> to open the 'Conversion Window'.

This dialog lets you select conform coordinates conversion. Then conversion is selected, use Points Editor to drop, move and erase points and marks.
Select menu item <Plot><Polar coordinates> table to view or and edit data points in 'conversed' (Polar, by default) coordinates.


The plan of the next version

OLE automation support. It will be possible to built-in FindGraph in your software. You will be able to send points from your programs to FindGraph .

A feature to plot any explicit function in the form x(t) = U(t), y(t) = V(t) or x=F(y).

Register FindGraph and provide the resources to support the software with enhancements and updates.


Information on Area

Information on area and points inside area:

  • Total number of points inside area;
  • Factor to correlations of all points inside area;
  • Areas value in given units of measurement;
  • Area ranges;
  • Min, max, mean, deviation of all points inside area.

Use this dialog to edit the parameters of series:

  • The title of a area.
  • The color of 6 possible.
  • Choose to fill or not area with color. The areas can overlay each other.

The button <Remove> lets you remove the area. Points will not be removed.

The button <Function...> starts the Wizard of approximation on all points inside area.

The button <Copy points> lets you copy points inside area and put points on the Clipboard.

The button <Remove points> lets you remove points inside area.


Information on Series of Points

Use this dialog to edit the parameters of series:

  • The title of a series.
  • The color of 6 possible.
  • The marker. Circle, cross, triangle.
  • The width of point in 0.1 mm. Width will be re-counted in physical units.
  • The aspect ratio Y/X.
  • Assign to connect points with line or no. Points with nearby numbers (Z) are connected.

The button <Remove> lets you remove all series.

The button <Function...> starts the Wizard of approximation on all points of series.

The button <Copy points> lets you copy points selected in grid and put them on the Clipboard.

The button <Remove points> lets you remove from series points selected in grid.

The button <Editor...> lets you you call the Text editor to edit X, Y, Z values.

Trick: Click on header of grid to sort points by X, Y or Z.


Information on Function

Use this dialog to edit the parameters of function:

  • Line width in 0.1 mm.
  • Color of line.
  • Select to draw or not lines of standard deviation.
  • Select to draw or not lines on centers of steps.
  • Approximation line visualization interval limits.

The button <Full window> lets you draw line on full window.

The button <Remove> lets you remove the function.

The button <Transform...> lets you create new points series. Points are on approximation line. The line of approximation will be removed.


Commentary

Use this dialog to edit the parameters of commentary:

  • The text;
  • The font;
  • The font size in 0.1 mm;
  • The font orientation, in tenths of degrees;
  • The font color;
  • The indent type;
  • The background color;
  • The shadow.

All font and color changes are immediately reflected on screen.

See the samples how to add commentary.

Formatted text

Push button Format to start dialog Text Formatting. This lets you format text font, color and align and input symbols, lines and images. Several HTML tags are possible:
<b> | a bold font
<i> | an italic font;
<u> | an underlined font;
<sup> | a superscript font;
<sub> | a subscript font;
<big> | a big font, the height is 125%;
<br> | start new paragraph;
<hr> | draw horizontal line with current color;
<font color="#rgb"> | sets the text color to the specified color rgb;
<date> | sets the current system Date;
<time> | sets the current system Time;
<font face="symbol"> | lets you select the Symbol or Greek characters;
<img src="gpoint.gif"> | lets you display the image file you selected.


Automation MS Visual Basic sample

Microsoft Visual Basic 6.0 sample

Project and testVB.exe see in directory TestVB. This runs program FindGraph in new window.

Private Declare Function GetModuleFileName Lib "kernel32" _
Alias "GetModuleFileNameA" _
(ByVal hModule As Long, _
ByVal lpFileName As String, _
ByVal nSize As Long) As Long

Dim FindGraph As Object

Sub LogError()
Print "error " & Err.Description
End Sub

Private Sub Form_Load()
On Error GoTo ErrHandler
' Create object FindGraph
Set FindGraph = CreateObject("FindGraph.Document")
' Run program FindGraph in new window
FindGraph.AppInit (1)

Exit Sub
ErrHandler:
LogError
Exit Sub
End Sub

Private Sub Form_Unload(Cancel As Integer)
On Error GoTo ErrHandler
' Close FindGraph application
FindGraph.AppQuit
ErrHandler:
Set FindGraph = Nothing
End Sub

' The example how to hide/show FindGraph main window
Private Sub CheckVisible_Click()
FindGraph.Visible = CheckVisible.Value 'True
End Sub

' The example how to add series of points
' Create new series named "VB_series"
' Add 500 points at once
Private Sub TestAddArray_Click()
On Error GoTo ErrHandler
Dim dwId, it, N As Long
Dim fX, fY, fZ As Double

N = 500
Dim va(1500) As Variant ' dimension N*3

' Create new series of points
dwId = FindGraph.DotsNew(2, 2, 20, 1, "VB_series")
' Set the identifier of a series
FindGraph.ArrayId = dwId
' Fill array with points
For i = 1 To N
fX = CDbl(8# / N * i)
fY = CDbl(5# / N * i)
fZ = CDbl(i)
it = (i - 1) * 3
va(it) = fX
va(it + 1) = fY
va(it + 2) = fZ
Next i
' Add all array at once
FindGraph.ArrayVar = va
' Repaint points
FindGraph.DotsUpdate dwId
Exit Sub
ErrHandler:
LogError
Exit Sub
End Sub

' The example how to add one point to series
' Create new series named "VB_point"
' Add 20 points on one
Private Sub TestAddOne_Click()
On Error GoTo ErrHandler
Dim dwId, it, N As Long
Dim fX, fY, fZ As Double

N = 20
' Create new series of points
dwId = FindGraph.DotsNew(1, 1, 50, 1, "VB_point")
For i = 1 To N
fX = CDbl(0.3 * i)
fY = CDbl(0.4 * i)
' Add single point to series
FindGraph.DotsAddPoint dwId, fX, fY, 0
' Repaint points
FindGraph.DotsUpdate dwId
Next i
FindGraph.DotsUpdate dwId
Exit Sub
ErrHandler:
LogError
Exit Sub
End Sub

' Create and select new area named "clip"
' Use nodes from VARIANT var array
Private Sub NewClip()
Dim dwId As Long
On Error GoTo ErrHandler
dwId = FindGraph.ClipNewEmptyRgn(1) ' BLUE
FindGraph.ArrayId = dwId
' Nodes (X,Y)
Dim va(12) As Variant ' dimension 4*3
va(0) = 1# '(1,5)
va(1) = 5#
va(2) = 0#
va(3) = 5# '(5,8)
va(4) = 8#
va(5) = 1#
va(6) = 7# '(7,5)
va(7) = 5#
va(8) = 2#
va(9) = 5# '(5,1)
va(10) = 1#
va(11) = 3#
' Create array of nodes
FindGraph.ArrayVar = va
' Select the area
FindGraph.ClipSelect dwId, 1

Exit Sub
ErrHandler:
LogError
Exit Sub
End Sub

' The example how to create new area and get all points selected
Private Sub TestGet_Click()
On Error GoTo ErrHandler
Dim fX, fY, fZ As Double
ListInit
' Create new area and select it
NewClip

' The example how to get whole array of points immediately
' Points - three-tuples (X,Y,Z)
' Copy selected points, put it on the buffer.
' N number of points selected
N = FindGraph.SelectedGetStart(0)
Dim va As Variant
va = FindGraph.ArrayVar
NGet = (UBound(va) + 1) / 3
If N > NGet Then N = NGet
Print "ub"; UBound(va)
' Fill the grid with points (X, Y, Z)
For i = 1 To N
it = 3 * (i - 1)
fX = va(it)
fY = va(it + 1)
fZ = va(it + 2)
ListAdd fX, fY, fZ
Next i
' Free memory
FindGraph.SelectedGetStop (0)
Exit Sub

' The example how to get single point
' Points - three-tuples (X,Y,Z)
' Copy selected points, put it on the buffer.
' N number of points selected
N = FindGraph.SelectedGetStart(0)
Print "n"; N
' In cycle we choose points and add to grid
For i = 1 To N
fX = FindGraph.SelectedGetX(i - 1)
fY = FindGraph.SelectedGetY(i - 1)
fZ = FindGraph.SelectedGetZ(i - 1)
ListAdd fX, fY, fZ
Next i
' Free memory
FindGraph.SelectedGetStop (0)
Exit Sub

ErrHandler:
LogError
Exit Sub
End Sub
' The example how to change plot properties
Private Sub TestProp_Click()
On Error GoTo ErrHandler
' Change the title
FindGraph.DocTitle = "From VB title"
' Change the scale of X axe
FindGraph.AxeXscale = 2
' Repaint
FindGraph.DocUpdate
Exit Sub
ErrHandler:
LogError
Exit Sub
End Sub

' The example how to digitize the background picture
' Display the background picture
' Create rectangle area and select it
' Digitize blue line inside rectangle
' Create new series named "FromPict"
' Assign green color and radius of circle 1 mm to points of series
Private Sub Digitize_Click()
On Error GoTo ErrHandler

'Get file name from module path and exe name
Dim strFileName As String
Dim lngCount As Long
strFileName = String(512, 0)
lngCount = GetModuleFileName(App.hInstance, strFileName, 512)
strFileName = Left(strFileName, lngCount - 10) & "money.gif"

' Change the title
FindGraph.DocTitle = "Digitize Now"
' Set background picture file name
'FindGraph.DocPictFileName = "d:\vc\FindGraph\TestVB\money.gif"
FindGraph.DocPictFileName = strFileName
' Display background picture
FindGraph.DocPictIs = True
' rectangle in physical units from (1,4) to (10,8)
' Get axes scales
Dim fXStart, fXScale, fYStart, fYScale As Double
fXStart = FindGraph.AxeXstart
fXScale = FindGraph.AxeXscale
fYStart = FindGraph.AxeYstart
fYScale = FindGraph.AxeYscale

' Calculate rectangle
Dim fLeft, fTop, fRight, fBottom As Double
fLeft = fXStart + fXScale * 1#
fTop = fYStart + fYScale * 4#
fRight = fXStart + fXScale * 10#
fBottom = fYStart + fYScale * 8#

' Create rectangle area with color number = 2 (GREEN)
Dim dwIdArea As Long
dwIdArea = FindGraph.ClipNewRect(2, fLeft, fTop, fRight, fBottom)
' Select area
FindGraph.ClipSelect dwIdArea, 1

' Digitize points inside rectangle
' Color number = 1 (BLUE)
' Radius of digitizing = 20 (2.0 mm)
Dim dwIdDots As Long
dwIdDots = FindGraph.DotsFromPict(1, 20, "FromPict")
' Assign green color, color number = 2 (GREEN)
FindGraph.DotsColorNumSet dwIdDots, 2
' Assign radius of new points = 10 (1.0 mm)
FindGraph.DotsWidthSet dwIdDots, 10

' Repaint
FindGraph.DocUpdate
Exit Sub
ErrHandler:
LogError
Exit Sub
End Sub
Private Sub ListInit()
ListView1.ListItems.Clear
Dim Col As ColumnHeader ' Declare variable
Set Col = ListView1.ColumnHeaders.Add(, , "X", ListView1.Width / 3)
Set Col = ListView1.ColumnHeaders.Add(, , "Y", ListView1.Width / 3)
Set Col = ListView1.ColumnHeaders.Add(, , "Z", ListView1.Width / 3)
End Sub

Private Sub ListAdd(X, Y, Z)
Dim Insert As ListItem
Set Insert = ListView1.ListItems.Add(, , CStr(X))
Insert.SubItems(1) = CStr(Y)
Insert.SubItems(2) = CStr(Z)
End Sub

See documentation Automation: methods and properties.


Automation MS Visual Basic sample

Microsoft Visual C++ 6.0 sample

By using Automation, the following samples, written in Visual C++, demonstrates how to:

  • Create an object of FindGraph.
  • Use IDispatch for embedded application.
  • Change properties.
  • Add series of points.
  • Get all points selected.
  • Perform error checking.
Project and testVC.exe see in directory TestVC. This runs program FindGraph as embedded.

How to use Crov.exe sample:

  1. Run Crov.exe;
  2. Push button Insert FindGraph or select menu item <Edit><Insert FindGraph>
  3. FindGraph plot will appear as embedded object;
  4. Deactivate it, to do this click on Crov work area;
  5. Message Box will appear: Document was not saved. Save changes? Select to save;
  6. Activate FindGraph embedded object, to do this click once on FindGraph object;
  7. Toolbar FindGraph buttons will become enabled;
  8. Push button Add new points or select menu item <FindGraph><Add points>;
  9. Two new points series will appear.
///////////////////////////////////////////////////////////////
// How to realise automation FindGraph.
// 1. Create IFindGraph wrapper class from a type FindGraph.tlb
// 2. Add #include "FindGraph.h"
//
// 3. Add to CRectItem:
// LPDISPATCH GetIDispatch();
// This returns IDispatch* for embedded application
// see sample from MSDN: HOWTO: IQ: Q184663 for details
//
// 4. Call FindGraphs's methods as wrapper:
// DECLARE_FINDGRAPHS(FindGraph);
// FindGraph.ReleaseDispatch();
//
//
//
//
//
//
///////////////////////////////////////////////////////////////
// nColor - color number
// 0 BLACK
// 1 BLUE
// 2 GREEN
// 3 RED
// 4 BROWN
// 5 GRAY
//
// nShape - marker
// 0 RECT (CROSS)
// 1 TRIA
// 2 CIRC
//
// nWidth - X radius, 0,1 mm
// fAspect - aspect ratio Y/X

///////////////////////////////////////////////////////////////
// IDispatch* for embedded application
//
LPDISPATCH CMainView::GetIDispatch()
{
if (m_pSelection != NULL)
return m_pSelection->GetIDispatch();
return NULL;
}

//start define--------------------------
#define DECLARE_FINDGRAPHS(FindGraphs) \
if (m_pSelection==NULL) return;\
m_pSelection->DoVerb(OLEIVERB_SHOW, this);\
LPDISPATCH lpDisp = GetIDispatch();\
if (lpDisp == NULL) return;\
IFindGraph FindGraphs;\
FindGraphs.AttachDispatch(lpDisp);\
//----------------------------end define

// How to add at some points to new series
//
void CMainView::FindGraphsSet()
{
DECLARE_FINDGRAPHS(FindGraph);

CString str;
long dwId;
short nColor = 1,
nShape = 2,
nWidth =25;
double fAspect = 1.;
CString strName = _T("By one");

// Create new series
dwId = FindGraph.DotsNew(nColor, nShape, nWidth, fAspect, strName);
m_dwIdDots = dwId;
if (dwId >= 0)
{
// How to add single point to series with dwId
int n = 20;
for (int i=0; i<n; i++)
{
double fX = 1. + 0.25*i,
fY = 7. - 0.35*i,
fZ = i;
FindGraph.DotsAddPoint(dwId, fX, fY, fZ);
// Optionally: paint appearance of each point
FindGraph.DotsUpdate(dwId);
}

}

// To add at once some points
// Create new series
// dwId - identifier of a series
dwId = FindGraph.DotsNew(2, 1, 20, 1, _T("At once"));
m_dwIdDots = dwId;
if (dwId >= 0)
{
int n = 1000;
int nParam = 3;
// If nParam==3 (x, y, z), if nParam==2 - x, y only
// One dimensional array with n*nParam elements zero-based indexing
SAFEARRAYBOUND bounds[1];
bounds[0].cElements = n*nParam;
bounds[0].lLbound = 0;
// Allocate the memory for the descriptor and the array data
SAFEARRAY *psa = SafeArrayCreate(VT_R8, 1, bounds);
if (psa)
{
psa->fFeatures = FADF_AUTO|FADF_FIXEDSIZE;
double *pr;
SafeArrayAccessData(psa, (void**)&pr);
// Initialize each element
int ip=0;
for (int i = 0; i < n; i++)
{
double fi = 2.*3.14159/n*i;
double fX = 4.+3.*sin(fi),
fY = 3.+2.*cos(fi),
fZ = i;
pr[ip++] = fX;
pr[ip++] = fY;
pr[ip++] = fZ;
}
SafeArrayUnaccessData(psa);// release lock on array state
// Create a VARIANT that contains our safearray
VARIANT var; ZeroMemory(&var, sizeof(var));
var.vt = VT_UI1 | VT_ARRAY;
var.parray = psa;
FindGraph.DotsAddPoints(dwId, nParam, var);
}

FindGraph.DotsUpdate(dwId);
}
FindGraph.ReleaseDispatch();
}

// How to get points selected
//
void CMainView::FindGraphsGet()
{
DECLARE_FINDGRAPHS(FindGraph);

// Copy selected points (X, Y, Z) and put it on the buffer.
long n = FindGraph.SelectedGetStart(0);
if (n)
{
if (n<10)
{
CDot dot;
// In cycle we choose points:
while (FindGraph.SelectedGetDot(&dot.m_fX, &dot.m_fY, &dot.m_fZ)==S_OK)
{
// There can be your operatings with points here
// For example to transfer them to Excel sheet
TRACE("x=%f y=%f z=%f\n", dot.m_fX, dot.m_fY, dot.m_fZ);

}
}
// How to get whole array of selected points at once
else
{
int nParam = 3; // x, y, z
SAFEARRAYBOUND bounds[1];
bounds[0].cElements = n*nParam;
bounds[0].lLbound = 0;
// Allocate the memory for the descriptor and the array data
SAFEARRAY *psa = SafeArrayCreate(VT_R8, 1, bounds);
if (psa)
{
psa->fFeatures = FADF_FIXEDSIZE; // NOTE: not FADF_AUTO
// Create a VARIANT that contains our safearray
VARIANT var; ZeroMemory(&var, sizeof(var));
var.vt = VT_UI1 | VT_ARRAY;
var.parray = psa;

// Fill array with points (X, Y, Z).
if (FindGraph.SelectedGetDots(nParam, &var)==S_OK)
{

double *pr;
SafeArrayAccessData(psa, (void**)&pr);
int ip=0;
// If nParam==3 Points by triples (X, Y, Z)
// If nParam==2 Points by couples (X, Y)
for (int i = 0; i < n; i++)
{
double fX = pr[ip ],
fY = pr[ip+1],
fZ = (nParam==3) ? pr[ip+2] : 0;
ip+=nParam;
// There can be your operatings with points here
TRACE("x=%f y=%f\n",fX, fY);
}
// Release lock on array state
SafeArrayUnaccessData(psa);
}
}
// Free buffer memory
n = FindGraph.SelectedGetStop(0);
}
}

FindGraph.ReleaseDispatch();
}

// The example how to change plot properties
//
void CMainView::FindGraphsParams()
{
// The identifier of a series
DWORD dwId = m_dwIdDots;
DECLARE_FINDGRAPHS(FindGraph);

// Item (FindGraph plot) size, 0,01 mm
CSize size (12000, 8000);
// Set new size to item
SelectionSetSize(size);

FindGraph.SetDocWidth (size.cx/10); // 0,1 mm
FindGraph.SetDocHeight(size.cy/10);

FindGraph.SetDocTitle (_T("From Crov title"));
FindGraph.SetDocComment(_T("From Crov comment"));
FindGraph.SetAxeXname (_T("Xname"));
FindGraph.SetAxeXunit (_T("Xunit"));
FindGraph.SetAxeXstart(-5.); // In X units
FindGraph.SetAxeXscale( 2.); // Ratio: X units / sm
FindGraph.SetAxeYname (_T("Yname"));
FindGraph.SetAxeYunit (_T("Yunit"));
FindGraph.SetAxeYstart(-2.); // In Y units
FindGraph.SetAxeYscale( 2.); // Ratio: Y units / sm

if (dwId >= 0)
{
CString str;
short nColor = 1,
nShape = 2,
nWidth =25;
double fAspect = 1.;

// Get color number of points in series
short nColorGet=0;
if (FindGraph.DotsColorNumGet(dwId, &nColorGet)==S_OK)
{
str.Format("nColorGet=%d",nColorGet);
//AfxMessageBox(str);
}
nColor=nColorGet+1;
// Set new color number
FindGraph.DotsColorNumSet(dwId, nColor);

// Get number of marker
short nShapeGet=0;
if (FindGraph.DotsShapeGet(dwId, &nShapeGet)==S_OK)
{
//str.Format("nShapeGet=%d",nShapeGet);
//AfxMessageBox(str);
}
nShape=nShapeGet+1;
// Set new number of marker
FindGraph.DotsShapeSet(dwId, nShape);

// Get radius of circle point
short nWidthGet=10;
if (FindGraph.DotsWidthGet(dwId, &nWidthGet)==S_OK)
{
//str.Format("nWidthGet=%d",nWidthGet);
//AfxMessageBox(str);
}
nWidthGet*=2;
if (nWidthGet > 50)
nWidthGet = 5;
// Set new radius of circle point
FindGraph.DotsWidthSet(dwId, nWidthGet);

// Get aspect ratio: (Height Y) / (Width X);
double fAspectGet=1;
if (FindGraph.DotsAspectGet(dwId, &fAspectGet)==S_OK)
{
//str.Format("fAspectGet=%f",fAspectGet);
//AfxMessageBox(str);
}
fAspectGet*=2;
if (fAspectGet > 10.)
fAspectGet = 0.25;
// Set new aspect ratio
FindGraph.DotsAspectSet(dwId, fAspectGet);

// Get title of a series
CString strNameGet;
//_bstr_t bstr;
BSTR bstr = strNameGet.AllocSysString();
if (FindGraph.DotsNameGet(dwId, &bstr)==S_OK)
{
strNameGet = CString(bstr);
//AfxMessageBox(strNameGet);
}
strNameGet = "new name";
// Set new title of a series
FindGraph.DotsNameSet(dwId, strNameGet);

// Assigns to connect points with line
FindGraph.DotsShowLine(dwId, 1);

// Next samples:
// How to get RGB value for number of color
// long color = FindGraph.DotsColor(1);

}
FindGraph.DocUpdate();
FindGraph.ReleaseDispatch();
}

See documentation on methods and properties.


Table

Text editor

Use this dialog to edit the points of series. It is possible:

  • To edit X, Y, Z values (float) ;
  • To remove the points you selected;
  • To insert the contents of the Clipboard.
Red cells | the cells with mistakes, not numbers.
Yellow cells | the cell with X, Y values being beyond the scope of plot

To start editing the cell:

  • Use <F2> or <Enter> or click the mouse on cell.

To stop editing the cell:

  • <Enter> - processes your input,
  • <Esc> - cancels your input

To move cursor, use arrows, <Tab> or the mouse.

The button <Remove> lets you remove points selected in the grid.

The button <Copy> lets you copy points selected in the grid and put them on the Clipboard.

The button <Paste> lets you insert the contents of the Clipboard into the grid.